\includegraphics[width=3cm]{{{ some_image }}}
I get exception:
Traceback (most recent call last):
File "/tornado/web.py", line 688, in _execute
getattr(self, self.request.method.lower())(*args, **kwargs)
File "index.py", line 92, in get
tex = markup.parse(self.render_string('curriculum_vitae.tex',
profile=profile), 'latex')
File "/tornado/web.py", line 387, in render_string
t = RequestHandler._templates[template_path].load(template_name)
File "/tornado/template.py", line 184, in load
self.templates[name] = Template(f.read(), name=name, loader=self)
File "/tornado/template.py", line 108, in __init__
self.compiled = compile(self.code, self.name, "exec")
File "curriculum_vitae.tex", line 44
if isinstance(_tmp, str): _buffer.append(_tmp)
^
SyntaxError: invalid syntax
This isn't elegant and not enough tested solution:
--- a/tornado/template.py
+++ b/tornado/template.py
@@ -457,7 +457,7 @@ def _parse(reader, in_block=None):
return body
# If the first curly brace is not the start of a special token,
# start searching from the character after it
- if reader[curly + 1] not in ("{", "%"):
+ if reader[curly + 1] not in ("{", "%") or reader[curly + 2]
== '{':
curly += 1
continue
break
But it would be not bad if I can use templates without patching tornado
"at home".