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 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

      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.

        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

          010101 true, but in my opinion this extension make searches really precise, so i love the way we give a new life to this project🙂

            6 days later

            Justoverclock Thanks dude, I'll be surely donating to you after 3 days, when my earnings gets on my Paypal account. I hope you won't mind.

            What do you think about creating an extension, that would be able to add meta keywords to the discussions? Like these:

            2 months later

            010101 I’m sure there will always be an extension or two not compatible (like that language selector). But, at least it works in all browsers and languages!

            As I am testing out and using this extension. It seems that this extension just won't work if without language selector. I disabled the language selector, however, I add the same hashtag when it was in different default language, when it is English(the hashtag is at the bottom of the post example 1], I can use this extension, but the hashtag just won't appear to be a link if the default language is Chinese[the hash tag is at the beginning of the postexample 2).

            I thought someone may want to know about this. 😀 It will be great if it could be compatible when the default language is simplified Chinese. Not sure why the default language will cause any issue. 😅

              ash3T mmmhhh I will look into this for sure, it works with Thai language and many others….really odd!

              The bad things is that I do not know Chinese so I can test this with basic google translate words

                [deleted] Thanks for sharing your thoughts. If what you suggest is that hashtags and Fof/discussion-language will not be compatible with each other. I did not use Fof/discussion-language, the language selector was for the default language of the whole forum, not for the discussions. I just installed Simplified Chinese language package.

                The way I test it out is only turn on one language package:
                1.English ON Simplified Chinese OFF (Scenario A)
                The hashtag works perfect. Even though, the whole article is in Chinese, and the tag is in Chinese too.

                2.Simplified Chinese ON English OFF (Scenario B)
                The newly added hashtag won't have a search link on the tags. However, the previous added hashtag still works(when Chinese was turn off).

                Then, I thought, I better bring this issue into attention. I guess if Scenario A works, then this extension shall work if the forum is using one language, for example, Simplified Chinese.

                  Justoverclock Thanks very much for your willingness to work on this. 😀 👏

                  Feel free to let me know if there is anything I can do to assist you with testing out the Chinese characters, this extension will improve our user experience exponentially.