diff options
author | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-04-08 15:01:12 -0700 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@friendco.de> | 2014-04-08 15:01:12 -0700 |
commit | 392573a9905a36d4a6c3cc1947c533f742b653a2 (patch) | |
tree | dd47c5039cdf2b24e8b54c141d2d5f161d116f4b /lib/parse/lex.js | |
parent | 554d6a6170d448d3c4cd635528d4f94e928472f2 (diff) | |
download | gitbook-392573a9905a36d4a6c3cc1947c533f742b653a2.zip gitbook-392573a9905a36d4a6c3cc1947c533f742b653a2.tar.gz gitbook-392573a9905a36d4a6c3cc1947c533f742b653a2.tar.bz2 |
Add lexing support for content code in exercises
#52, #49, #46
Diffstat (limited to 'lib/parse/lex.js')
-rw-r--r-- | lib/parse/lex.js | 5 |
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'; } |