Skip to content

Commit

Permalink
[HTML] correctly scope comment punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
keith-hall committed Oct 2, 2017
1 parent 1b20678 commit 31458e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion HTML/HTML.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ contexts:
- include: string-double-quoted
- include: string-single-quoted
- match: <!--
scope: punctuation.definition.comment.html
scope: punctuation.definition.comment.begin.html
push:
- meta_scope: comment.block.html
- match: '(-*)--\s*>'
scope: punctuation.definition.comment.end.html
captures:
1: invalid.illegal.bad-comments-or-CDATA.html
pop: true
Expand Down
5 changes: 4 additions & 1 deletion HTML/syntax_test_html.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@
</head>
<body>
<!-- Comment -->
## ^ comment.block.html
## ^^^^^^^^^^^^^^^^ comment.block.html
## ^^^^ punctuation.definition.comment.begin.html
## ^^^ punctuation.definition.comment.end.html
## ^^^^^^^^^ - punctuation

<!----- hyphens - -- --- -->
## ^^^^^^^^^^^^^^^^^^^^^^^^^ comment.block.html
Expand Down

0 comments on commit 31458e7

Please sign in to comment.