{% for section in pages[article.path].content %} {% if section.type == "normal" %} {% autoescape false %}{{ section.content }}{% endautoescape %} {% elif section.type == "exercise" %} Exercise #{{ exercise }} {% autoescape false %}{{ section.content }}{% endautoescape %} {% autoescape false %}{{ section.code.base|code }}{% endautoescape %} {% set exercise = exercise + 1 %} {% endif %} {% endfor %}