Skip to content

Commit

Permalink
Fix indentation after a {literal{/literal} block.
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Lewenhaupt authored and marijnh committed Jan 1, 2020
1 parent a471580 commit 45ed413
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion mode/soy/soy.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@

case "literal":
if (stream.match(/^(?=\{\/literal})/)) {
state.indent -= config.indentUnit;
state.soyState.pop();
return this.token(stream, state);
}
Expand Down
8 changes: 8 additions & 0 deletions mode/soy/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@
' Old message',
'[keyword {/msg}]');

MT('literal-indent',
'[keyword {template] [def .name][keyword }]',
' [keyword {literal}]',
' Lerum',
' [keyword {/literal}]',
' Ipsum',
'[keyword {/template}]');

MT('special-chars',
'[keyword {sp}]',
'[keyword {nil}]',
Expand Down

0 comments on commit 45ed413

Please sign in to comment.