Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR also adds an editorconfig file which I added so that my editor would match your indent style by default, but I can remove that if you'd prefer.
My fix also just tries lowercase if the key from the AST doesn't exist, but if this is too broad, I can add a special case just for
viewBox
. There are other camelCase attributes in SVG, though, so I figured I'd go for broader rather than narrower.A further option would be to set a list of camelCase SVG attributes and only try lowercase for those attributes. See https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
See also htmlhint/HTMLHint#28, htmlhint/HTMLHint#183
This could also totally be a bug to open against parse5 instead.
UPDATE: I opened a bug with parse5 (inikulin/parse5#318), so if they choose to fix that, this fix will become obsolete.