Jinja2 correctly renders three curly braces next to each other if a white space is inserted, as shown in Case 1 below. However, without a white space an exception is thrown, case 2 below. White spaces are here indicated with red bars.
Is it possible to render an output without including white spaces, that is render an output like \textbf{Hello, World!}?
A python code example is listed below
from jinja2 import Template
template_1 = Template(r"\textbf{ {{msg}} }")
#template_2 = Template(r"\textbf{{{msg}} }") # Throws an exception
msg = "Hello, World!"
out_1 = template_1.render({'msg':msg})
#out2 = template_2.render({'msg':msg}) # FAILS!
print(out_1)
Output
\textbf{ Hello, World! }
What I would like to have is
\textbf{Hello, World!}
