grip
grip copied to clipboard
Bugfix: Titles with accents (example: Spanish) was not working
Markdown titles that contains accents (example: in Spanish) has an encoded location.hash
.
To make the scrollDown working in that cases, you need to use decodeURIComponent
, in the other case the element will not be found and scrollDown will not occur.
An example with the title "Configuración" ("Configuration" in Spanish)
Configuración
location.hash:
"#2-configuraci%C3%B3n"
# the letter "ó" is encoded
But the element ID has the accent without the encoding: