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

Recognize self-closing tags, take two #304

merged 2 commits into from Aug 31, 2017


None yet
3 participants

50Wliu commented Aug 8, 2017


  • 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

This is a modified and somewhat simplified version of #257. It features different regexes to prevent catastrophic backtracking and doesn't do any start/end-range swapping.

Alternate Designs

This kind of is the alternative.


Hopefully self-closing tags will be properly recognized now.

Possible Drawbacks

All three tag-related regexes got pretty serious overhauls. It may be that there is not yet enough spec coverage and there is a corner case that is broken by these changes.

Applicable Issues

Fixes #303
Fixes #203

/cc: @NLBuescher @ungb


This comment has been minimized.

Show comment
Hide comment

50Wliu commented Aug 8, 2017



NLBuescher approved these changes Aug 14, 2017 edited

I implemented these changes on a fresh clone of master and tried to reproduce issue #303. Atom had no trouble opening the sample code in the file (from #303), and was still able to distinguish self-closing tags from their matched counterparts.

The changes seem to do what they intend to do.

/cc @50Wliu @ungb

@Ben3eeE Ben3eeE merged commit b46c4ec into master Aug 31, 2017

2 checks passed

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

@Ben3eeE Ben3eeE deleted the wl-nlb-self-closing-tags branch Aug 31, 2017

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