Skip to content

Commit

Permalink
Fix indent after newline for interpolated-code token
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Quadflieg committed Nov 23, 2019
1 parent c32a8d1 commit bfb90c6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ export const plugin: Plugin = {
result += '| ';
break;
case 'indent':
case 'newline':
result = printIndent(previousToken, result, indent, indentLevel);
result += '| ';
break;
Expand Down
8 changes: 8 additions & 0 deletions test/pug-tests/escape-test.formatted.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
doctype html
html
head
title escape-test
body
textarea
- var txt = '<param name="flashvars" value="a=&quot;value_a&quot;&b=&quot;value_b&quot;&c=3"/>';
| #{txt}
8 changes: 8 additions & 0 deletions test/pug-tests/escape-test.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
doctype html
html
head
title escape-test
body
textarea
- var txt = '<param name="flashvars" value="a=&quot;value_a&quot;&b=&quot;value_b&quot;&c=3"/>'
| #{txt}

0 comments on commit bfb90c6

Please sign in to comment.