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

problems with page jump links, like in TOC, and special chars #461

Closed
dkern opened this issue May 18, 2017 · 1 comment
Closed

problems with page jump links, like in TOC, and special chars #461

dkern opened this issue May 18, 2017 · 1 comment
Labels

Comments

@dkern
Copy link
Contributor

dkern commented May 18, 2017

I've notices some problems with page jump links and special chars. For example, having a headline like this:

# TEST : Test

Will generate an h1 element like this:

<h1 id="page_TEST+%3A+Test">TEST : Test</h1>

So the link, genereated by TOC is also escape the : chart to %A3:

#page_TEST+%3A+Test

But such jump links don't work with special char escaping. It should be used a generation like GitHub uses it. So the above example would result in #test-test, all lower case and separated by -, specialchars will be ignored completly.

@onigoetz
Copy link
Collaborator

Hello, I fixed this in the master branch, I didn't notice the escaped strings actually didn't work as URLS.

So I applied the escaping like you proposed, and I also added a uniqueness check in case two headings are identical

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

No branches or pull requests

2 participants