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

HTML Attribute values converting to lowercase #24

Closed
panoply opened this issue Aug 15, 2022 · 0 comments
Closed

HTML Attribute values converting to lowercase #24

panoply opened this issue Aug 15, 2022 · 0 comments
Labels
HTML HTML Language Patch Improvement or fixes applied to Sparser / PrettyDiff

Comments

@panoply
Copy link
Owner

panoply commented Aug 15, 2022

Description

This issue is something that I believe to had introduced in the lexer during refactors. Could be something I considered a good idea during lack of sleep. Whatever the case it is problematic. Take the following:

<div id="Foo" data-attr-something="SoMeThInG"></div>

The above code will be converted to:

<div id="foo" data-attr-something="something"></div>

While this is fine for a lot of situation it is not nice for situations where one is using a framework like Stimulus, Alpine or a use case which requires case preservation.

Ruleset

I believe this calls for a new ruleset to be introduced. In some situation folks might want to enforce lowercase while others might want to preserve the case structures, it will vary. By default, casing should be preserved as it was provided and users should optionally enable enforced lowercase. I will create a separate issue going into more detail regarding this.

@panoply panoply added Patch Improvement or fixes applied to Sparser / PrettyDiff HTML HTML Language labels Aug 15, 2022
@panoply panoply closed this as completed in 594005b Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML HTML Language Patch Improvement or fixes applied to Sparser / PrettyDiff
Projects
None yet
Development

No branches or pull requests

1 participant