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 not making header ids lowercase #567

Open
peci1 opened this issue Jul 31, 2018 · 2 comments
Open

Allow not making header ids lowercase #567

peci1 opened this issue Jul 31, 2018 · 2 comments
Assignees
Labels
PR: request-changes This PR needs additional changes

Comments

@peci1
Copy link

peci1 commented Jul 31, 2018

Code in https://github.com/showdownjs/showdown/blob/develop/src/subParsers/makehtml/headers.js#L95 and following lines always applies toLowerCase() to the header ID.

I'd like to have an option to not make the IDs lowercase (as some tools, e.g. Boostnote, do not change case of the header IDs).

@tivie tivie self-assigned this Aug 5, 2018
@tivie
Copy link
Member

tivie commented Aug 5, 2018

We do lower case comparisons because some mobile browsers and older browsers, ids are case insensitive. So, in order to prevent id duplication (and weird issues), we lower case the id attribute value.

Also, Github, and most markdown implementations lowercase generated ids

@tivie tivie added the PR: request-changes This PR needs additional changes label Aug 5, 2018
@peci1
Copy link
Author

peci1 commented Aug 8, 2018

I agree that comparing case-insensitive by default is a good idea. However, in my use-case, I need the case-sensitive IDs, thus I'm asking for having an option to turn off the conversion to lowercase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: request-changes This PR needs additional changes
Projects
None yet
Development

No branches or pull requests

2 participants