Fix printing of {{{raw}}} handlebars expressions (#4535)

Previously, `{{{raw}}}` would be output as `{{raw}}`.
This commit is contained in:
Dray Lacy authored and Christopher Chedeau committed 2018-05-24 11:16:50 -07:00
1 parent 27b1005455
commit bb6d130b5b
3 files changed
+11 -2

No files matched your search

+2 -2
View File
@@ -148,10 +148,10 @@ function print(path, options, print) {
const isConcat = pp && pp.type === "ConcatStatement";
return group(
concat([
/*n.escaped ? "{{{" : */ "{{",
n.escaped === false ? "{{{" : "{{",
printPathParams(path, print),
isConcat ? "" : softline,
/*.escaped ? "}}}" :*/ "}}"
n.escaped === false ? "}}}" : "}}"
])
);
}
@@ -132,3 +132,11 @@ exports[`nested-path.hbs 1`] = `
</div>
</div>
`;
exports[`raw.hbs 1`] = `
<p>{{{raw}}}</p>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<p>
{{{raw}}}
</p>
`;
+1
View File
@@ -0,0 +1 @@
<p>{{{raw}}}</p>