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

Deconflict variable names #134

Merged
merged 5 commits into from
Dec 6, 2016
Merged

Deconflict variable names #134

merged 5 commits into from
Dec 6, 2016

Conversation

Rich-Harris
Copy link
Member

Svelte was being somewhat cavalier about variable names. With this PR, names that are added to the template scope via {{#each ...}} blocks are gathered during the validation phase, and then avoided when the code generator is assigning unique variable names. It's not the most sophisticated approach in the world, but it's fast and should be reliable, I think.

Fixes #88.

@codecov-io
Copy link

codecov-io commented Dec 6, 2016

Current coverage is 91.31% (diff: 100%)

Merging #134 into master will increase coverage by 0.05%

@@             master       #134   diff @@
==========================================
  Files            51         52     +1   
  Lines          1408       1417     +9   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1285       1294     +9   
  Misses          123        123          
  Partials          0          0          

Powered by Codecov. Last update 53c6b87...4d3dcb6

@Rich-Harris Rich-Harris merged commit 26d3f93 into master Dec 6, 2016
@Rich-Harris Rich-Harris deleted the gh-88 branch December 6, 2016 17:30
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.

2 participants