Closed FichteFoll closed 7 years ago
Surely the expected behavior from the example should be to close the template
tag?
Ah, yes. Edited.
It seems the way the close_tag
command works is that it checks if the /
before the >
is scoped as punctuation.definition.tag.end.html
- if it is, then it is skipped when finding the open tag that needs to be closed. So we can update the syntax definition to scope the /
if it exists before the >
.
i.e change https://github.com/sublimehq/Packages/blob/54340707ecbf7de99ab5b02b9414258bd27ed403/HTML/HTML.sublime-syntax#L218 and https://github.com/sublimehq/Packages/blob/54340707ecbf7de99ab5b02b9414258bd27ed403/HTML/HTML.sublime-syntax#L208 to look like https://github.com/sublimehq/Packages/blob/54340707ecbf7de99ab5b02b9414258bd27ed403/HTML/HTML.sublime-syntax#L148
Branched off from #78.
This works as expected for tags like
<img />
but not for seemingly arbitrary tags.Reproduction
Have the following text in an HTML file (or syntax):
When typing
</
at the end it closes with</price>
.Expected behavior: Complete to
</template>
.