Skip to content

Slugify section anchors #168

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

Closed
dtolnay opened this issue Aug 28, 2016 · 3 comments · Fixed by #173
Closed

Slugify section anchors #168

dtolnay opened this issue Aug 28, 2016 · 3 comments · Fixed by #173

Comments

@dtolnay
Copy link
Member

dtolnay commented Aug 28, 2016

For a section like ## Hello World mdBook currently creates an anchor like page.html#Hello World. The anchor should be slugified to be more URL-friendly: page.html#hello-world.

@azerupi
Copy link
Contributor

azerupi commented Aug 28, 2016

This has been changed recently, anchors are now url encoded.

A section like ## Hello World should produce an anchor of the form page.html#Hello%20World. If that is not the case, it is a bug.

@dtolnay
Copy link
Member Author

dtolnay commented Aug 28, 2016

I would strongly prefer #hello-world. I don't like sharing or receiving links containing nasty urlencoded symbols because people want to know what they are clicking. GitHub agrees.

@azerupi
Copy link
Contributor

azerupi commented Aug 28, 2016

I think I have to agree too.
It seems reasonable to change it to a more user-friendly form.

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 a pull request may close this issue.

2 participants