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

Improve entity scopes, take two #160

Merged
merged 7 commits into from
Sep 20, 2017
Merged

Improve entity scopes, take two #160

merged 7 commits into from
Sep 20, 2017

Conversation

winstliu
Copy link
Contributor

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

Redo of #98, this time taking into account that entities in attributes behave differently. I tried to follow the spec as closely as possible.

Alternate Designs

  • The list of valid entities could be included. I'd rather not do that though.
  • Single-line matches before the begin/end pattern removes the potential for runaway rules, but means that all entities will appear as invalid before they are finished.

Benefits

Realize you're writing an entity before you finish doing so. This also benefits autocomplete-html.

Possible Drawbacks

There may still be room for regressions that I didn't take into account.

Applicable Issues

See #98, #141, #142.

/cc @DavidePastore, @JonathanWolfe - see anything that could potentially break with this version?

@DavidePastore
Copy link
Contributor

This looks ok for me 👍 Maybe you could add a test with a new line after the "&" character, and check that it works as expected. Thanks for including me in this discussion. 😃

@winstliu
Copy link
Contributor Author

winstliu commented Jun 8, 2017

Sorry for the late response @DavidePastore. Can you elaborate on what the expected behavior should be, and would you like to see a test for both text and attribute entities, or just text?

@JonathanWolfe
Copy link
Contributor

LGTM

@DavidePastore
Copy link
Contributor

@50Wliu Sorry for the delay. I'd like to see a test for both text and attribute entities (for example in the placeholder attribute). For both it should be possibile to have a & character and then a new line. Anyway maybe it could be a redundant test.

@winstliu
Copy link
Contributor Author

@winstliu winstliu merged commit 9fde136 into master Sep 20, 2017
@winstliu winstliu deleted the wl-entities-take-two branch September 20, 2017 18:32
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.

4 participants