You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add via template tag modifier. – affects the contents of the enclosed brackets only
Current
console.log(JSON.stringify(t.transform(` {{#expect title}} <h1> {{{ title }}} </h1> `)));//=> "import{esc as $$1}from\"tempura/utils\";export default function($$2){var{title}=$$2,x=`\n\t\t\t`;x+=`\n\t\t\t<h1>\n\t\t\t\t${title}\n\t\t\t</h1>\n\t\t`;return x}"console.log(JSON.stringify(t.compile(` {{#expect title}} <h1> {{{ title }}} </h1> `)({title: 'foobar'})));//=> "\n\t\t\t\n\t\t\t<h1>\n\t\t\t\tfoobar\n\t\t\t</h1>\n\t\t"
Ideal
console.log(JSON.stringify(t.transform(` {{#expect title}} <h1> {{{~ title ~}}} </h1> `)));//=> "import{esc as $$1}from\"tempura/utils\";export default function($$2){var{title}=$$2,x=`\n\t\t\t`;x+=`\n\t\t\t<h1>${title}</h1>\n\t\t`;return x}"console.log(JSON.stringify(t.compile(` {{#expect title}} <h1> {{{~ title ~}}} </h1> `)({title: 'foobar'})));//=> "\n\t\t\t\n\t\t\t<h1>foobar</h1>\n\t\t"
Purging the extra whitespace between HTML tags and/or the ends of the output string would handled by an external utility and/or.trim() .... or I can bring back the minify option (linked commit), which only took care of whitespace between HTML tags and newlines.
The text was updated successfully, but these errors were encountered:
Add via template tag modifier. – affects the contents of the enclosed brackets only
Current
Ideal
Purging the extra whitespace between HTML tags and/or the ends of the output string would handled by an external utility and/or
.trim()
.... or I can bring back theminify
option (linked commit), which only took care of whitespace between HTML tags and newlines.The text was updated successfully, but these errors were encountered: