Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Fix improper tokenization of script tags#167

Merged
winstliu merged 8 commits intomasterfrom
wl-fix-script-tags
Sep 17, 2017
Merged

Fix improper tokenization of script tags#167
winstliu merged 8 commits intomasterfrom
wl-fix-script-tags

Conversation

@winstliu
Copy link
Contributor

@winstliu winstliu commented Sep 16, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

#90, take two, now that I understand what clamp patterns are. Makes style and script tag matching a bit saner, and fixes some incorrect scopes. In addition, overarching meta.tag.<tag-type>.html scopes have been added.

Alternate Designs

Not sure yet. Just wanted to get my PR fixed before investigating if this can be improved further now that I have two years more knowledge :). - see 5c92fe4

Benefits

Less wonky workarounds.

Possible Drawbacks

Just a hunch, but I believe this somewhat hurts multiline tags. - Fixed!

Applicable Issues

Fixes #82
Fixes #120

@winstliu
Copy link
Contributor Author

Ok, multiline tag handling should be back on par with master. I'll add some extra tests when I get the chance.

@winstliu
Copy link
Contributor Author

Some syntax themes (e.g. fizzy) may attempt to add .tag styling to the entirety of the embedded block due to the presence of meta.tag.script.html. This is not a problem with any of the core syntax themes. If it turns out to be a widespread problem, I will investigate reverting the new meta scopes.

@winstliu winstliu merged commit 4d08712 into master Sep 17, 2017
@winstliu winstliu deleted the wl-fix-script-tags branch September 17, 2017 12:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ctrl-/ on entire HTML style block uses CSS comment syntax Embedded scripts handled poorly

1 participant