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

Revamp tag handling #93

Closed
wants to merge 7 commits into from
Closed

Revamp tag handling #93

wants to merge 7 commits into from

Conversation

winstliu
Copy link
Contributor

This is a fairly large PR, so I'll try to explain it as best as possible:

  1. meta.tag.any.html has been removed. This pattern really made absolutely no sense since it was trying to match <hello></hello>, but with meta.scope.between-tag-pair.html shoved between the < and /. It was also trying to match attributes in the text content itself, between the two tags. Finally, since it was the very first pattern, it was overriding other patterns such as the script ones when they were on a single line.
  2. meta.tag.other.html is basically the replacement for meta.tag.any.html, but without its downfalls. It's a catch-all for any tag that wasn't previously matched.
  3. (Most) tag patterns have been updated to match all the way from the opening tag to the closing one. This way, we can identify out-of-order tags and label them as invalid.illegal.out-of-order-tag.html (such as <abc><def></abc></def>).
  4. Some tag patterns still only match the tag itself. These patterns are for singleton tags and other tags that don't require a closing tag, such as p, br, area, and more.
  5. All tags (including comments) now have appropriate punctuation.definition.tag.begin.html (.comment for comments) and .end selectors. Previously, it was inconsistent and some had them, while others only had punctuation.definition.tag.html.

Note: Please merge after #90. That PR changed around the script tags and I'd like to make sure that they're consistent with the changes made in this PR before merging this one.

Fixes #25

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant