Fix printing of {{{raw}}} handlebars expressions (#4535)
Previously, `{{{raw}}}` would be output as `{{raw}}`.
This commit is contained in:
1 parent
27b1005455
commit
bb6d130b5b
3 files changed
+11
-2
No files matched your search
@@ -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>
|
||||
`;
|
||||
@@ -0,0 +1 @@
|
||||
<p>{{{raw}}}</p>
|
||||
Reference in new issue
Block a user