Skip to content

Commit 9e457c2

Browse files
committed
Merge branch 'st4134'
2 parents 85e14dc + fa713dd commit 9e457c2

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

Syntaxes/Liquid.sublime-syntax

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ contexts:
162162

163163
liquid-statement-tag-body:
164164
- include: jekyll-links
165+
- include: liquid-block-comments
165166
- include: liquid-line-comments
166167
- include: liquid-assignments
167168
- include: liquid-conditionals
@@ -220,6 +221,17 @@ contexts:
220221

221222
###[ LIQUID COMMENTS ]########################################################
222223

224+
liquid-block-comments:
225+
- match: \bcomment\b
226+
scope: keyword.declaration.comment.liquid
227+
push: liquid-block-comment-body
228+
229+
liquid-block-comment-body:
230+
- meta_content_scope: comment.block.liquid
231+
- match: \bendcomment\b
232+
scope: keyword.declaration.comment.liquid
233+
pop: 1
234+
223235
liquid-line-comments:
224236
- match: \#+
225237
scope: punctuation.definition.comment.liquid

tests/syntax_test_liquid.liquid.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@
3232
| ^ punctuation.definition.comment.liquid
3333
%}
3434

35+
36+
{% liquid
37+
38+
comment
39+
| ^^^^^^^ meta.statement.liquid keyword.declaration.comment.liquid - comment
40+
commented text
41+
| ^^^^^^^^^^^^^^^ comment.block.liquid
42+
endcomment
43+
| ^^^^^^^^^^ meta.statement.liquid keyword.declaration.comment.liquid - comment
44+
%}
45+
3546
{% if true %}
3647
| <- meta.embedded.liquid source.liquid meta.statement.liquid punctuation.section.embedded.begin.liquid
3748
|^^^^^^^^^^^^ meta.embedded.liquid source.liquid meta.statement.liquid

0 commit comments

Comments
 (0)