of course, and they don’t work; but not even a full wildcard works:
/TBI\s*.?(\d*)/,https://tbi.example.com/tbi/$1/
It looks to me like the category pop-up functionality may be taking this over and not allowing Linkify to do its matching work — even when the user doesn’t choose one of the offered categories.
Is this expected behavior or a bug? Does anyone know of a way to work around it?
Yeah, if you inspect the HTML source code, Discourse seems to put anything prefaced with hastag in a separate span element which breaks the linkify theme flow. I don’t think there is an easy fix for this, sorry. You’d need to fork the theme and customize it specifically for this case I’m afraid, unless somebody has a better idea.
This plug works well, thanks. However, in combination with abrify it doesn’t work.
Is it possible for the link to work as well with the class it adds with this plugin: https://github.com/metabrainz/discourse-abbrify-words.
I think the issue is that the abbrify plugin skips link tags by defualt. You can try to fix it by modifying the code, deleting line 16 in head_tag.html
Thanks, I wonder if it is possible to do the same, but to add a different class instead of the abriffy attribute, e.g. dfn data-info or span aria-label or other of this type
really good. I have got to play on it a little bit.
I guess there might be a lot of possibilities here. Do you have any idea how to use json and api here in some way?
For example, to be able to display abriffy words and others data on wordpress through api ?
I am not sure what you mean. Could you be more concrete on what you’re trying to achieve? Theme components run on in Discourse, there’s no API to use them elsewhere. But you should, for the most part be able to use the JS code by simply copying it elsewhere and modify discourse-specific parts.
You can try adding the <aside> tag in the skipped tags settings. Although I am not sure that all oneboxes are placed inside the <aside>. Maybe we would need a filter based on class name,
@sam any thoughts on this? This would seem like a reasonable default behaviour (not autolink in oneboxes).
We did a code refactor recently and it is possible that you have to update your Discourse (which is convenient anyway since 2.4 has just been released )
Seems like this hasn’t been resolved? I thought I could create a backup by exporting the component from the admin interface, but the export doesn’t include the custom settings.
An idea: What if the setting with all its rows turns into an editable text area on double-click? Similar to the Edit CSS/HTML editors? That would make it easy to backup/export as well as import a list of items with one item per line.
Before:
On double-click:
On a different note: you might see some weird Regex there, but you can’t use | in these setting fields. Maybe that could be solved with the above proposal as well.