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

be more relaxed about attribute casing #1095

Merged
merged 1 commit into from
Jan 11, 2018
Merged

be more relaxed about attribute casing #1095

merged 1 commit into from
Jan 11, 2018

Conversation

Rich-Harris
Copy link
Member

fixes #1062

@codecov-io
Copy link

codecov-io commented Jan 11, 2018

Codecov Report

Merging #1095 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1095      +/-   ##
==========================================
+ Coverage   91.53%   91.54%   +0.01%     
==========================================
  Files         123      123              
  Lines        4477     4483       +6     
  Branches     1443     1444       +1     
==========================================
+ Hits         4098     4104       +6     
  Misses        162      162              
  Partials      217      217
Impacted Files Coverage Δ
src/generators/nodes/Attribute.ts 85.92% <100%> (+0.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cfa174...2781968. Read the comment docs.

@Conduitry
Copy link
Member

Do you think it makes more sense to do this normalization during parsing instead of during generation? I don't think it actually currently matters, but in the future it might be good to know we always have canonically-cased attributes in the AST.

@Rich-Harris
Copy link
Member Author

I wondered about that. I think it might cause problems with components though — you don't know at parse time whether something is an element or a component (at least until v2 when we insist that components are capitalised and elements are not), and if we 'corrected' <Widget viewbox='...'> then it would break stuff.

@Conduitry
Copy link
Member

Ah I wasn't thinking about that, makes sense.

@Rich-Harris Rich-Harris merged commit 664da84 into master Jan 11, 2018
@Rich-Harris Rich-Harris deleted the gh-1062 branch January 11, 2018 18:42
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.

case-sensitivity of SVG viewBox likely to cause silent errors
3 participants