huntertran / markdown-toc

Auto MarkdownTOC (Table Of Contents) plugin for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=huntertran.auto-markdown-toc
MIT License
39 stars 25 forks source link

Remove accents from anchor links #19

Closed rolandtoth closed 4 years ago

rolandtoth commented 4 years ago

Hi,

this extension almost works perfectly for our needs but there's one breaking issue: the generated TOC anchor links contain accents when the headings contain accents (in non-English languages).

The problem is that they don't work in Acrobat reader:

FAIL:
- [Bevezető](#markdown-header-bevezető)

OK:
- [Link header](#markdown-header-link-header)

Is there a way to clean up these special chars and replace them with normal ones? If not, please consider this as a feature request :)

huntertran commented 4 years ago

I'm thinking of convert all the unicode character to URL encoded or ASCII. This will be a new feature

rolandtoth commented 4 years ago

Sounds great, thanks!

huntertran commented 4 years ago

this is implemented in 3.0.7

rolandtoth commented 4 years ago

In the meantime I had to fix it myself because of deadlines, and added a few other fixes as well, but thanks anyway!

huntertran commented 4 years ago

Ah nice. A pull request will always be welcomed ;)