Quick update, probably user error.
I misunderstood "Restart NodeBB" to mean restart the process. When using the Restart button on the Dashboard and uninstall/reinstall the plugin works as expected in the simple case.
Sorry to bother y'all. Thanks.
Yeah I noticed that too, the regex needs work, also I believe it has something to do with markdown adding the tags before this plugin gets executed. ie
<p>#sometag</p> when it goes into this plugin so the hashtag becomes
@baris couldn't you adjust your plugin's hook listener to a higher priority? Markdown has priority 5
I'm not sure how your plugin priority system works though, never really looked into it.
higher priority means lower priority. WAT?
it needs a
priority <= 4
Priority of 1: Be the 1st to run
that makes more sense.
Hey, bitch to the person who designed the plugin system.
.. oh wait, that's me :squirrel:
I know I had a debate with myself over which was better. I ended up deciding that lower priority means higher priority, if you think about it as "1st to run", like @Mr_Waffle said, then it works out.
When I changed it to priority 1 it inserted all the anchor texts into the content and they werent actualy links. Dunno why, I guess markdown comes after it and escapes them?
Yeah, Markdown sanitizes HTML, so that might be why. It has to come after the parser
So there exists a conflict between hashtags and markdown, in that a # at the beginning of a line signifies a
h1. Hashtags in the middle of the line work, so that's fine...
So I'm not sure why, but the URL is set to https://twitter.com/search?q=%40AggroTactics rather than https://twitter.com/search?q=AggroTactics. The first URL does a search with @AggroTactics rather than #AggroTactics. So I changed it on my local but it instead added the literal '@'... not sure where that is coming from. Not sure if that was intended... seems weird.