Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c1cb72

Browse files
committed
Handle correctly exercises in ebook
1 parent 7cee248 commit 0c1cb72

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div class="exercise-header">Exercise</div>
2+
{% autoescape false %}{{ section.content }}{% endautoescape %}
3+
<pre><code>{% autoescape false %}{{ section.code.base|code }}{% endautoescape %}</code></pre>
4+
<hr>
5+
<p>Solution:</p>
6+
<pre><code>{% autoescape false %}{{ section.code.solution|code }}{% endautoescape %}</code></pre>

theme/templates/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h1 class="book-chapter book-chapter-{{ progress.current.level|lvl }}">{{ progre
2020
{% if section.type == "normal" %}
2121
{% autoescape false %}{{ section.content }}{% endautoescape %}
2222
{% elif section.type == "exercise" %}
23-
{% include "./includes/book/exercise.html" with {section: section} %}
23+
{% include "./includes/page/exercise.html" with {section: section} %}
2424
{% elif section.type == "quiz" %}
2525
{% include "./includes/book/quiz.html" with {section: section} %}
2626
{% endif %}

0 commit comments

Comments
 (0)