diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 15:55:06 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-03-31 15:55:06 -0700 |
commit | fcdb12f4caaa69524cd0e33068b6743af62d79fd (patch) | |
tree | 3d55efb2f052cd2f39a69f0ea34425c658406fce /templates/includes | |
parent | 2d29121e2e6a49912cd5e635974737d1002b6d3e (diff) | |
download | gitbook-fcdb12f4caaa69524cd0e33068b6743af62d79fd.zip gitbook-fcdb12f4caaa69524cd0e33068b6743af62d79fd.tar.gz gitbook-fcdb12f4caaa69524cd0e33068b6743af62d79fd.tar.bz2 |
Set size of exercise code editor according to solution
Use the number of lines in solution to set editor’s size
Diffstat (limited to 'templates/includes')
-rw-r--r-- | templates/includes/book/exercise.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/includes/book/exercise.html b/templates/includes/book/exercise.html index 8b1fd1f..5d721f9 100644 --- a/templates/includes/book/exercise.html +++ b/templates/includes/book/exercise.html @@ -12,7 +12,7 @@ <div class="message"> {% autoescape false %}{{ section.content }}{% endautoescape %} </div> -<div class="editor" style="height: {{ section.content.split("\n").length*20 }};">{{ section.code.base }}</div> +<div class="editor" style="height: {{ section.code.solution|lines*20 }}px">{{ section.code.base }}</div> <pre class="hidden code-solution">{{ section.code.solution }}</pre> <pre class="hidden code-validation">{{ section.code.validation }}</pre> |