Skip to content

Commit 45ed413

Browse files
Axel Lewenhauptmarijnh
authored andcommitted
Fix indentation after a {literal{/literal} block.
1 parent a471580 commit 45ed413

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

mode/soy/soy.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@
329329

330330
case "literal":
331331
if (stream.match(/^(?=\{\/literal})/)) {
332-
state.indent -= config.indentUnit;
333332
state.soyState.pop();
334333
return this.token(stream, state);
335334
}

mode/soy/test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,14 @@
201201
' Old message',
202202
'[keyword {/msg}]');
203203

204+
MT('literal-indent',
205+
'[keyword {template] [def .name][keyword }]',
206+
' [keyword {literal}]',
207+
' Lerum',
208+
' [keyword {/literal}]',
209+
' Ipsum',
210+
'[keyword {/template}]');
211+
204212
MT('special-chars',
205213
'[keyword {sp}]',
206214
'[keyword {nil}]',

0 commit comments

Comments
 (0)