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

Handle multiple ampersands followed by ASCII characters in attributes #180

Merged
merged 1 commit into from Dec 7, 2017

Conversation

Projects
None yet
1 participant
@50Wliu
Member

50Wliu commented Dec 7, 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

When multiple ampersands were present in attributes without = separating them, language-html would incorrectly mark the whole thing starting from the first ampersand as a character entity. To prevent that we now explicitly check for the existence of a semicolon before marking it as an entity.

Alternate Designs

Hardcode the list of character entities to remove ambiguity.

Benefits

No runaway highlighting.

Possible Drawbacks

This still isn't the best because it's essentially the same as a regular match, meaning that autocomplete providers will still have to use string-based matching in attributes rather than token-based matching to autocomplete entities.

Applicable Issues

#141

@50Wliu 50Wliu merged commit 412bb59 into master Dec 7, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@50Wliu 50Wliu deleted the wl-attribute-entity-alphabetical-characters branch Dec 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment