summaryrefslogtreecommitdiffstats
path: root/lib/parse/lex.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-09 08:23:11 +0200
committerSamy Pessé <samypesse@gmail.com>2014-04-09 08:23:11 +0200
commit99594791e0c34aee3659370b8c2072df815c9051 (patch)
tree5a523d3cbd3aec55a9bbf97beda7bff7605e9b62 /lib/parse/lex.js
parent1b432288f041baef2ebe54c96a7a86f547b14c67 (diff)
parent2cc23b7e3411e1748bc8a25114a7bf9185a210f1 (diff)
downloadgitbook-99594791e0c34aee3659370b8c2072df815c9051.zip
gitbook-99594791e0c34aee3659370b8c2072df815c9051.tar.gz
gitbook-99594791e0c34aee3659370b8c2072df815c9051.tar.bz2
Merge Optional github
Diffstat (limited to 'lib/parse/lex.js')
-rw-r--r--lib/parse/lex.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/parse/lex.js b/lib/parse/lex.js
index 6b3236e..def74b4 100644
--- a/lib/parse/lex.js
+++ b/lib/parse/lex.js
@@ -23,7 +23,10 @@ function sectionType(nodes, idx) {
type: 'code'
}).length;
- if(codeNodes === 3 && (idx % 2) == 1) {
+ if(
+ (codeNodes === 3 || codeNodes === 4) &&
+ (idx % 2) === 1)
+ {
return 'exercise';
}