markdown-toc
markdown-toc copied to clipboard
Add support of ß (a German letter)
Behavior
My headline "Preußen" results in the link [Preußen](#preuen).
Background information
The letter "ß" is used very often in German.
Solution
Change
hash = hash.replace /[^a-z0-9\u4e00-\u9fa5äüö\-]/g, ""
to
hash = hash.replace /[^a-z0-9\u4e00-\u9fa5äüö\u00df\-]/g, ""
Explanation
ß has the character code \u00df.
Even simpler...
hash = hash.replace /[^a-z0-9\u4e00-\u9fa5äüöß\-]/g, ""