DavidWells / markdown-magic

💫  Automatically format markdown files via comment blocks using source code, external data & custom transforms.
811 stars 227 forks source link

Unicode/emoji in header anchors/IDs are broken #27

Closed svict4 closed 3 years ago

svict4 commented 6 years ago

Anchor links that the markdown-toc plugin generates for the Toc, precent encodes any Unicode/emoji. That's all cool, but it appears that the headings strips any Unicode when creating the actual anchors. Meaning that those Toc links with Unicode in them won't work, such as those on the README.md:

e.g. the ToC has the link https://github.com/DavidWells/markdown-magic#%F0%9F%94%80-code but the anchor link is https://github.com/DavidWells/markdown-magic#-code

I haven't looked into the issue much, it could be that GFM always strips non-ascii_identifiers (I couldn't see anything in the GFM spec about it) or that it's an issue upstream with markdown-toc or something to do with this package,

DavidWells commented 3 years ago

Fixed with latest version