conflicts between -hashtags and -extended-markdown plugins
-
hashtags plugin interferes with extended markdown, and title (#anchor) , colored text and spoiler text are not converted anymore...
this is when nodebb-plugin-hashtags plugin is activated:
this is when the plugin is deactivated:
GitHub - NodeBB/nodebb-plugin-hashtags: Enable hashtags in topics and posts
Enable hashtags in topics and posts. Contribute to NodeBB/nodebb-plugin-hashtags development by creating an account on GitHub.
GitHub (github.com)
Is it possible to edit the hashtags plugin, so that when there is a special character such as "();/ after a pound sign but before a space, it is not recognized as a tag (or hashtag)?
-
and this is how it looks for the title:
hashtags plugin thinks I am trying to add a tag called #anchor
-
@crazycells said in conflicts between -hashtags and -extended-markdown plugins:
Is it possible to edit the hashtags plugin, so that when there is a special character such as "();/ after a pound sign but before a space, it is not recognized as a tag (or hashtag)?
or alternatively, extended markdown functions can be excluded from hashtags plugin. I believe, regular markdown functions are excluded in the codes...
GitHub - MinecraftForgeFrance/nodebb-plugin-extended-markdown: A NodeBB plugin to extend markdown with new feature as tooltip, anchor, custom text header with background, etc.
A NodeBB plugin to extend markdown with new feature as tooltip, anchor, custom text header with background, etc. - MinecraftForgeFrance/nodebb-plugin-extended-markdown
GitHub (github.com)
-
exclusion of extended-markdown functions · Issue #131 · NodeBB/nodebb-plugin-hashtags
this plugin interferes with some of the extended markdown functions listed below. Can these be excluded from the hashtags plugin? colored text spoiler text anchor title https://community.nodebb.org/topic/16344/conflicts-between-hashtags-...
GitHub (github.com)
-
we would like to be able to use hashtags freely
so, it would be great if extended markdown functions are excluded from nodebb-plugin-hashtags plugin...
-
@crazycells can you try changing this line in hashtags plugin from
regex: /(?:^|\s|>|;|")(#[\w\-_]+)/g, // greatly simplified from mentions, but now only supports latin/alphanum
to
regex: /(?:^|\s|>|;|")(#[\w\-_]+)(?=[^>]*<)/g, // greatly simplified from mentions, but now only supports latin/alphanum
Let me know if that works. Seems like the hashtags plugin is matching stuff in html attributes.
-
@baris said in conflicts between -hashtags and -extended-markdown plugins:
@crazycells can you try changing this line in hashtags plugin from
regex: /(?:^|\s|>|;|")(#[\w\-_]+)/g, // greatly simplified from mentions, but now only supports latin/alphanum
to
regex: /(?:^|\s|>|;|")(#[\w\-_]+)(?=[^>]*<)/g, // greatly simplified from mentions, but now only supports latin/alphanum
Let me know if that works. Seems like the hashtags plugin is matching stuff in html attributes.
Yes, this fix is working.
NodeBB 1.19.3...
extended markdown functions work as markdown, # signs work as tags now...Will you update the hashtags plugin? or should we fork and apply the change? I guess it is better to update the original plugin, because there are others with the same problem:
anchor for title is considered as a tag... · Issue #5 · MinecraftForgeFrance/nodebb-plugin-extended-markdown
The first #anchor() mention in text is considered as a tag... Is there a way to change the syntax or stop parsing the anchor tag? Cheers
GitHub (github.com)
-