010101
Thank You! Now working. I have a comment when there is a hashtag and an image insert directly below each other, without skipping Eg:
-hashtag
-image link
Then the hashtag not working, but if i skipping a line
-hashtag

-image link
then working.

    djalmasi Yep, that’s how it is designed for now. It was conflicting with formatting and image changes from other extensions. To prevent the conflict you can no longer have a hashtag in the same paragraph as formatted text or images.

    Hashtags are now only allowed in plain text paragraphs like this one or on a new line by themselves.

    Due to lack of spare time, this is the best I can do right now. At least it will no longer break images or anything.

      010101 Thank you for the fast reply, thats okay. I glad, that its working.

      Thanks for the update

      010101 underscore in tags doesn't work after update. For example, hashtag #flarum_rules is clickable only on #flarum part and _rules is a plain text.

        Arnold Honestly I didn't even know people used underscores in hashtags. I had to go over to Twitter just now to see. Sure enough, people do sometimes use underscores. I'm betting this is fixable by again tweaking the regular expression. I just have to tell the regular expression, "allow underscores." I wonder if this part stopped working when I changed the regular expression so that all/most languages are supported? I'm not sure.

          010101 yep, that's a common practice in Twitter and Instagram. It would be great if you could fix it 🙂

            Arnold Done.

            Version 3.5 released

            • Adds back underscore and also hyphen support... because, why not? 🙂
              6 days later

              @010101this is great have you consider the possibility of building an extension based on this. We can pull out the search result and display a list a related post links based on hashtag

                huuduy216 I’m sorry I do not understand if this is a question or not. You can click a hashtag and it runs a search finding other posts with that word.

                  010101 yes you can. I'm saying that have you ever thought of making it ever better, completely out of scope of this extension better. We would make an extension that can display related post based on their hashtag.

                    huuduy216 Gotcha. Yes, I think/hope that one day a developer will come along and make a really nice/fancy hashtag solution. Something on par with Twitter. But, I won’t be able to do that. 😅

                      8 days later

                      This extension isn't compatible with beta 14+. Unless someone wants to adopt this extension, or give me the exact code to patch it, I think it'll have to go to the extension graveyard 💀 . From what I've read so far I assume it is due to Mithril 2.0. More specifically due to config no longer being a lifecyle hook? I don't have the skills to update it even though it's probably relatively simple. I tried making some guesses after reading some docs, but no luck.

                      I feel bad because I do think there are several people that use this. But, we'll have to wait for a developer to possibly, one day, create a new hashtag extension. One that is probably way better than this one.

                        010101 CommentPost.prototype.config is now CommentPost.prototype.oncreate and CommentPost.prototype.onupdate. There's no longer an isInitalized parameter, instead oncreate is called once, and onupdate is called for subsequent redraws.

                        Basically

                        extend(CommentPost.prototype, 'config', function (out, isInitialized, vnode) {
                            // [the code]
                        });

                        becomes

                        extend(CommentPost.prototype, 'oncreate', function (out, vnode) {
                            // [the code]
                        });
                        extend(CommentPost.prototype, 'onupdate', function (out, vnode) {
                            // [the code]
                        });

                        A function can be used to not repeat the code.

                        Or, when isInitialized is used:

                        extend(CommentPost.prototype, 'config', function (out, isInitialized, vnode) {
                            if (isInitialized) return;
                            // [the code]
                        });

                        becomes

                        extend(CommentPost.prototype, 'oncreate', function (out, vnode) {
                            // [the code]
                        });

                        EDIT: ignore my previous edit referencing super, it only applies if you were creating your own components.

                          clarkwinkelmann Thank you for being willing to help! The problem is that this is one of those extensions done the wrong way where everything is in the extend.php file.

                          This isn't working:

                          <script>
                          flarum.core.compat.extend.extend(flarum.core.compat['components/CommentPost'].prototype, 'oncreate', function (output, context) {
                              if (context.customExtLastContentHtml !== context.contentHtml) {
                          
                                     // [the code]    
                          
                             context.customExtLastContentHtml = context.contentH tml;
                            });
                          </script>

                          Original code that did work until beta 14:

                          <script>
                            flarum.core.compat.extend.extend(flarum.core.compat['components/CommentPost'].prototype, 'config', function(output, isInitialized, context) {
                              if (context.customExtLastContentHtml !== context.contentHtml) {
                          
                                              // [the code]    
                          
                             context.customExtLastContentHtml = context.contentH tml;
                            });
                          </script>

                            010101 So it will not be updated?
                            Or you not sure about that?
                            Maybe you could go on Discord and try ask some help on devs.

                            I would help if i had knowledge for that, but i do not!
                            Im sure they will find some minutes to give a hand

                            Good luck

                            010101 The arguments to oncreate are different than those to config. Replace the second argument with vnode. Then, where you need to access the DOM element, use vnode.dom