Skip to content

Commit 672523f

Browse files
vranamarijnh
authored andcommitted
[soy mode] Highlight command wrapped right after command
1 parent c11f34f commit 672523f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

mode/soy/soy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
return "keyword";
273273

274274
// A tag-keyword must be followed by whitespace, comment or a closing tag.
275-
} else if (match = stream.match(/^\{([\/@\\]?\w+\??)(?=[\s\}]|\/[/*])/)) {
275+
} else if (match = stream.match(/^\{([/@\\]?\w+\??)(?=$|[\s}]|\/[/*])/)) {
276276
if (match[1] != "/switch")
277277
state.indent += (/^(\/|(else|elseif|ifempty|case|fallbackmsg|default)$)/.test(match[1]) && state.tag != "switch" ? 1 : 2) * config.indentUnit;
278278
state.tag = match[1];

mode/soy/test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,8 @@
114114

115115
MT('literal-comments',
116116
'[keyword {literal}]/* comment */ // comment[keyword {/literal}]');
117+
118+
MT('highlight-command-at-eol',
119+
'[keyword {msg]',
120+
' [keyword }]');
117121
})();

0 commit comments

Comments
 (0)