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

Allow non alphabetic initial in heading anchor #788

Merged
merged 2 commits into from
Oct 23, 2018
Merged

Allow non alphabetic initial in heading anchor #788

merged 2 commits into from
Oct 23, 2018

Conversation

weihanglo
Copy link
Member

@weihanglo weihanglo commented Sep 9, 2018

In HTML5 standard, there is no restriction on what forms an ID attribute. The only reason to append a alphabet in the front of original characters is for compatibility.

As far as I know, some popular content generating services, including GitHub, GitBook and GitLab, accept a heading with non-alphabetic initial as a valid ID attribute. Maybe we can conform with the standards without appending an unexpected arbitrary character on ID. This feature will make writing much more ergonomic for non-English users.

Reference: https://www.w3.org/TR/html52/dom.html#element-attrdef-global-id

@Michael-F-Bryan
Copy link
Contributor

This seems pretty reasonable, I think we were just being conservative during the initial implementation.

@Michael-F-Bryan Michael-F-Bryan merged commit b0513ee into rust-lang:master Oct 23, 2018
@weihanglo weihanglo deleted the feat/non-ascii-heading-anchor branch October 23, 2018 12:00
Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
…g-anchor

Allow non alphabetic initial in heading anchor
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.

None yet

2 participants