Handle correctly exercises in ebook

This commit is contained in:
Samy Pessé
2014-10-12 11:37:51 +02:00
parent 7cee248426
commit 0c1cb724d7
2 changed files with 7 additions and 1 deletions
@@ -0,0 +1,6 @@
<div class="exercise-header">Exercise</div>
{% autoescape false %}{{ section.content }}{% endautoescape %}
<pre><code>{% autoescape false %}{{ section.code.base|code }}{% endautoescape %}</code></pre>
<hr>
<p>Solution:</p>
<pre><code>{% autoescape false %}{{ section.code.solution|code }}{% endautoescape %}</code></pre>
+1 -1
View File
@@ -20,7 +20,7 @@
{% if section.type == "normal" %}
{% autoescape false %}{{ section.content }}{% endautoescape %}
{% elif section.type == "exercise" %}
{% include "./includes/book/exercise.html" with {section: section} %}
{% include "./includes/page/exercise.html" with {section: section} %}
{% elif section.type == "quiz" %}
{% include "./includes/book/quiz.html" with {section: section} %}
{% endif %}