Are you running this on your local machine? Do you have build-essentials installed?
Unsolved Parsing posts and markdown plugin with auto-linking
@julian Yes, Plugin sanitizes HTML, if I use higher priority than markdown plugin.
Actually It's sanitizes HTML and changes http urls on anchor tags, - double punch
If I use lower priority, I have my replacement as href property of anchor tag
I would like to find friendly way, so my plugin will work well with
And I don't like idea to extend my regular expressions to comply with anchor tags
@Nicolas What I mean to say is... don't send HTML into Markdown plugin, it'll sanitise it, which is likely not intended.
If you need to do more than replace the url, then unfortunately, you will have to alter the HTML after-the-fact
However, I recently had to mess around with it, so... here's a handy dandy regex for you to re-appropriate
/<a.+?href="(.+?)".*?>(.*?)<\/a>/g(matches all links)
@a_5mith that regex could help you too, if you want to modify your plugins to handle other arguments in the HTML string, like
@julian I don't like this idea, and situation in overall. Basically, It creates dependency in mine plugin to check if URLs were already changed, handle optional anchor tags, etc...
So, I will go with this:
- Disable Autoconvert for urls (Plugin's users will have to do the same)
- Use low priority
@Nicolas wait, what are you trying to do? It looks like you're trying to convert a video link into an iframe tag, is that right?
@BDHarrington7 - https://github.com/NicolasSiver/nodebb-plugin-ns-embed
I'm working with different URLs to change them on HTML, most complex replacements will be iframes.
I have plans to release this plugin with:
@BDHarrington7 yes, I have checked them before I have started development
My YouTube plugin needs updating. But I'm in London tomorrow to Thursday. Then spending alternate weeks in gibraltar. So its hard to find the time.