How can I make a string containing non unicode characters to be translated to a string usable by links and anchors? Ex: replace “ä” to “a”
Neither urlize nor anchorize do this, they keep “ä” so it’s outputting “ä” in the value of the HTML id tag and %c3%a4 in the value of the HTML href tag, breaking a tabs navigation.
For now I work around this with replace but it’s ugly and not future-proof.
In case you need it here is the code and the preview
Yes, but I have to use autoHeadingIDType: blackfriday because autoHeadingIDType: github-ascii drops the accents instead of replacing them (see this issue) and does not strip the trailing - for some languages (see this issue).