Conflict of JavaScript template engines

Writing a project in Node.js+Express.js templating with Swig.
On the user side using a template engine doT.js

The question arose to pass in the browser type:

string {{=it.stringVar}}



But I don't know how to get Swig to treat the portion of the string as a variable (i.e. don't process curly braces).
To do escape I will not be satisfied because then you need to process the string using doT.js

Is there any mechanism to solve my problem?

Thanks in advance!

October 3rd 19 at 02:02
1 answer
October 3rd 19 at 02:04
Solution

{% raw %} string {{= it.stringVar}} {% endraw %}
Read more in swig docs.

Find more questions by tags Node.jsTemplate builders