010101 what's your error?
Hashtag
Justoverclock Same as before. Invalid regular expression. Safari/iOS doesnāt like it. Thereās a lot of posts online about it.
Justoverclock This simulates look behind. So it could fix it.
interesting, do u know how it works?
Justoverclock Never mind on the above. I may have found a solution... Pull request submitted. Test it out.
- Edited
010101 this will parse even https://docs.flarum.org/#about-flarum anchor tag...so i think is not good
- Edited
Justoverclock Oops, ok, try new pull request...
https://regex101.com/r/MdIxm1/1
Just some slight differences which Safari is OK with. And should work with all languages.
Oh shoot. It's SO close... I just realized the latest one is ignoring anchor tags and other characters but it's including the preceding space...
010101 yes i was about to write this to u....we are close btw
Justoverclock I'm not sure why but simply adding a space on line 15 where the hyperlink is created makes it work...
010101 with your last regexp? can u provide the string so i can make some test?
Justoverclock You won't be able to just test it with the regex online tool. There's something about adding a space before the anchor on line 15 that makes it fully work.
010101 yeah i will test on a local flarum
@010101 unfortunately even this one can't work, because if u add 2 hashtag in the same post, the second return with "#" in the generated link
- Edited
Justoverclock Wow. Well, one of these times I'll get it. Another pull request is coming your way. This could be the winner. This solution adds in a couple extra .replace() and .trim() methods.
Justoverclock Fingers crossed!!
010101 u can drink a glass of whiskey
- Edited
0.1.9
010101 Give it a full test on your mac and thx. Probably we have finally reached the goal toghether
Updating
composer update justoverclock/flarum-ext-hashtag
php flarum cache:clear