Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Titles with accents (example: Spanish) was not working #393

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skrosoft
Copy link

@skrosoft skrosoft commented Sep 12, 2024

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:

Captura de pantalla 2024-09-12 a la(s) 10 12 03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant