Skip to content

Commit 0f79545

Browse files
author
Keith Hall
committed
[Java] use embed instead of unnecessary with_prototype for JavaDoc
1 parent 1cb4c3e commit 0f79545

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Java/JavaDoc.sublime-syntax

+5-10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ hidden: true
88

99
variables:
1010
id: '(?:[\p{L}_$][\p{L}\p{N}_$]*)'
11+
javadoc_block_tag_terminator: (?=^\s*\*?\s*@)
1112

1213
contexts:
1314
prototype:
@@ -31,9 +32,8 @@ contexts:
3132

3233
# Block tag in the first line (immediately after '/**').
3334
- match: \s*(?=@)
34-
push: javadoc-block-tags
35-
with_prototype:
36-
- include: javadoc-block-tag-terminator
35+
embed: javadoc-block-tags
36+
escape: '{{javadoc_block_tag_terminator}}'
3737

3838
# We rely on 'escape' to pop the inner context out.
3939
# 'set' unfortunately will mess up the meta scopes.
@@ -42,19 +42,14 @@ contexts:
4242
- match: ^\s*(\*)?\s*(?=@)
4343
captures:
4444
1: punctuation.definition.comment.javadoc
45-
push: javadoc-block-tags
46-
with_prototype:
47-
- include: javadoc-block-tag-terminator
45+
embed: javadoc-block-tags
46+
escape: '{{javadoc_block_tag_terminator}}'
4847
- include: inline-formatting
4948

5049
inline-formatting:
5150
- include: javadoc-inline-tags
5251
- include: scope:text.html.basic
5352

54-
javadoc-block-tag-terminator:
55-
- match: (?=^\s*\*?\s*@)
56-
pop: true
57-
5853
javadoc-block-tag-base:
5954
- meta_scope: meta.block-tag.javadoc
6055
- include: inline-formatting

0 commit comments

Comments
 (0)