Use of Dot inside curly brackets is breaking the rendering of swig template. I am not sure if its a bug.
I have the code like this some where in between html text for a article:
<pre>
<code>
<span>new Promise (function (resolve, reject) {...} );</span>
</code>
</pre>
Using dots inside brackets {...} is breaking the rendering. Why? When I remove it was working fine but I had to track down the issue.
This is happening because
{and}are reserved characters in Swig.Swig will evaluate everything inside those characters, so it is trying to evaluate
..., which isn't a valid Swig expression.You need to replace replace those characters with HTML entities to prevent Swig from evaluating them.