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
The output is less than ideal when \{ and \} are present -- there is additional string concatenation going on in the compiled function that is pretty ugly:
Template:
\{\{Outer with data\}\} {{data.name}}
<code>
\{\{Nested\}\}
</code><code>
\{\{Nested with data\}\} {{data.name}}
</code>
Output:
(functionanonymous(data_0){varfrag=document.createDocumentFragment();vardata=data_0;varel0=document.createTextNode("{"+"{"+"Outer with data"+"}"+"}"+" "+data_0["name"]+"\n\n");frag.appendChild(el0);varel1=document.createElement("code");el1.textContent="\n "+"{"+"{"+"Nested"+"}"+"}"+"\n";frag.appendChild(el1);varel2=document.createTextNode("\n\n");frag.appendChild(el2);varel3=document.createElement("code");el3.textContent="\n "+"{"+"{"+"Nested with data"+"}"+"}"+" "+data_0["name"]+"\n";frag.appendChild(el3);returnfrag;})
The parser could be modified to concatenate the braces into an existing content block instead of creating a new one, or DOMly could be fixed to combine content blocks into a single string instead of concatenating multiple strings.
The output is less than ideal when
\{
and\}
are present -- there is additional string concatenation going on in the compiled function that is pretty ugly:Template:
Output:
The parser could be modified to concatenate the braces into an existing content block instead of creating a new one, or DOMly could be fixed to combine content blocks into a single string instead of concatenating multiple strings.
This is due to the fixes for #7. @cif
The text was updated successfully, but these errors were encountered: