Skip to content

Commit

Permalink
Merge pull request #949 from paddyobrien/master
Browse files Browse the repository at this point in the history
Print unescaped statements correctly
  • Loading branch information
rwjblue authored Jun 25, 2019
2 parents cad7655 + 7346574 commit a232b98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@glimmer/syntax/lib/generation/print.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ export default function build(
break;
case 'MustacheStatement':
{
output.push(compactJoin(['{{', pathParams(ast), '}}']));
output.push(
compactJoin([ast.escaped ? '{{' : '{{{', pathParams(ast), ast.escaped ? '}}' : '}}}'])
);
}
break;
case 'MustacheCommentStatement':
Expand Down
3 changes: 3 additions & 0 deletions packages/@glimmer/syntax/test/generation/print-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ let templates = [

// slash in path
'{{namespace/foo "bar" baz="qux"}}',

// unescaped
'{{{unescaped}}}',
];

QUnit.module('[glimmer-syntax] Code generation', function() {
Expand Down

0 comments on commit a232b98

Please sign in to comment.