The trouble is with using regex to find hashtags in plain Markdown and just replacing them with HTML -- that method lacks the context to know instances when it shouldn't replace "hashtags", like inside code blocks
Right, I listed the changes made in the forked repo. Mostly, it's to make the parser more strict. Changes are all based off of how people were actually using Write.as, e.g. trying to insert special formatting / characters but not wanting it to actual render some special way.
The twitter-text-go library is the best one I've found that works with any language / character set you can throw at it. We can always switch if there's a better library out there, but I doubt any take markdown into consideration like we'd need them to.
This improves rendering in a number of situations:
- it keeps anchor tags working
- it gives the user some control for not linking, for example in code
hashTags at the beginning of a line without a space won't get linked.
Workaround related to issues #42 and #6 and #33
As reported here: https://mst3k.interlinked.me/@cadey/100673777784986480
The text was updated successfully, but these errors were encountered: