Closed mire22 closed 1 year ago
did you try {%p raw %} ... {%p endraw %}
(with a 'p') ? you may have also to escape {%
and {{
with {_%
and {_{
(see doc)
Thank you!
It works well with {_%tr for item in table_contents %_}
and {_%tr endfor %_}
. I tested {_
before but I wasn't using it well.
I've noticed you have to be very careful that the escaped tags are in the same "run". So editing an existing tag and inserting a may not work. I had to re-type the `{{and
{_%` to be sure the escaped tags are properly parsed.
Describe your problem
Hi,
I would like to create a template with both tags and values in a docx document. The idea is that the user can after copy/paste the tags in his own document (an elaborated document, for example a report) and have at the same time the example of what will be the values after rendering. Basically, I want to have in the same docx escaped tags and tags. It's working well with
{% raw %}
and{% endraw %}
for the "simple tags" but not for the "special syntax tags" (refering to doc) for the tables for example. The lines{%tr for item in table_contents %}
and{%tr endfor %}
are disapearing. I already tried the options of issue #355 but it's still not working.Thank you for your help!
Provide a test case
automated_report_template_2.docx automated_report_2.txt: rename extension to .py
I'm expecting to find in the rendered document the elements between
{% raw %}
and{% endraw %}
not rendered.