Justoverclock I don’t know if it’ll work. It probably depends on how you did the RegEx. But, I did this in the original extension. Everything in the codepen regular expression (see above) before the “#” does nothing but attempts to ensure html, BBcode, markdown, and similar things are ignored.
.replace(/((?!([\S]))[\S\s])#(\p{L}+)/gu,' <a href="'+siteURL+'?q=$3" class="hashlink" title="Find more posts tagged with $3">#$3</a>');
See the part with ?! and the three \s... that’s to make sure if a hashtag is preceded by markdown or html it is ignored. Which means you couldn’t do formatted hashtags. But, this way it’s less likely to conflict with something (maybe). 😒