You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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