MinecraftForgeFrance / nodebb-plugin-extended-markdown

A NodeBB plugin to extend markdown with new feature as tooltip, anchor, custom text header with background, etc.
BSD 2-Clause "Simplified" License
19 stars 10 forks source link

anchor for title is considered as a tag... #5

Closed MaxWaldorf closed 2 years ago

MaxWaldorf commented 2 years ago

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

robin4002 commented 2 years ago

Hi, Sorry, I didn't understood what is the problem. Can you send a example?

Best regards

MaxWaldorf commented 2 years ago

Simple:

NodeBB consider any word with # as a tag...

Unfortunately, #anchor is considered as a tag... Since you can only put a tag once in the text, the first time you use #anchor() it doesn't translate into a title but in a tag...

The following ones are translated as titles.


Il y a un souci de parsing puisqu'il y a un conflit entre le tag et l'expression title qui utilise #anchor() proposée...

A chaque fois la première fois que #anchor() est utlisé ça devient un tag et non pas un titre... Par contre, étant donné que NodeBB ne process un tag qu'une fois, les suivants sont bien reconnus...

Donc bref, ça ne marche pas la première fois qu'on l'utilise dans un post mais les suivants (dans le même post) fonctionnent...

robin4002 commented 2 years ago

I cannot reproduce the issue. Both on my forum and on my local test instance NodeBB doesn't parse # as a tag. What is your theme and your extension list ? Or maybe it's a setting on ACP panel ?

MaxWaldorf commented 2 years ago

Here is a list of plugins:

nodebb-plugin-archiver
nodebb-plugin-composer-default
nodebb-plugin-dbsearch
nodebb-plugin-desktop-notifications
nodebb-plugin-emoji
nodebb-plugin-emoji-android
nodebb-plugin-extended-markdown
nodebb-plugin-feed
nodebb-plugin-gravatar
nodebb-plugin-hashtags <-- This one might be the one creating issues
nodebb-plugin-imgur
nodebb-plugin-markdown
nodebb-plugin-mentions
nodebb-plugin-night-mode
nodebb-plugin-openidconnect
nodebb-plugin-poll
nodebb-plugin-question-and-answer
nodebb-plugin-recent-cards
nodebb-plugin-shortcuts
nodebb-plugin-soundpack-default
nodebb-plugin-spam-be-gone
nodebb-plugin-youtube-embed
nodebb-rewards-essentials
nodebb-widget-essentials

This would be maybe interesting to have #anchor removed from potential tags or to change the #anchor syntax to something else...

Cheers

MaxWaldorf commented 2 years ago

Ping...

Any updates?

robin4002 commented 2 years ago

Hi,

Sorry, I was busy. I installed the plugin nodebb-plugin-hashtags on my local test instance and I still cannot reproduce the issue.*

I can put anyway an alternate syntax if you want. Which syntax do you want ? Maybe an additional ! can fix the conflict? (i.e !#anchor(Title here))

MaxWaldorf commented 2 years ago

That would be nice if you could yes :)

Thank you and happy new year!

MaxWaldorf commented 2 years ago

Bump

AliCihan commented 2 years ago

@robin4002 we are having the same problem with #anchor as @MaxWaldorf has, with the new hashtags system in NodeBB, it is converted to a tag rather than a title... There are additional problems we had, I wrote them here:

https://github.com/MinecraftForgeFrance/nodebb-plugin-extended-markdown/issues/6

AliCihan commented 2 years ago

@MaxWaldorf this commit solved the issue:

https://github.com/NodeBB/nodebb-plugin-hashtags/commit/61b87f28c46b2f66ed39f24ea122258a5b8b97cb

robin4002 commented 2 years ago

Sorry again for my inactivity ...

Awesome! Thanks to barisusakli!