summaryrefslogtreecommitdiffstats
path: root/lib/parse/page.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@friendco.de>2014-04-08 15:01:12 -0700
committerAaron O'Mullan <aaron.omullan@friendco.de>2014-04-08 15:01:12 -0700
commit392573a9905a36d4a6c3cc1947c533f742b653a2 (patch)
treedd47c5039cdf2b24e8b54c141d2d5f161d116f4b /lib/parse/page.js
parent554d6a6170d448d3c4cd635528d4f94e928472f2 (diff)
downloadgitbook-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/page.js')
-rw-r--r--lib/parse/page.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/parse/page.js b/lib/parse/page.js
index 56a9e60..3479c85 100644
--- a/lib/parse/page.js
+++ b/lib/parse/page.js
@@ -72,6 +72,8 @@ function parsePage(src, options) {
base: codeNodes[0].text,
solution: codeNodes[1].text,
validation: codeNodes[2].text,
+ // Context is optional
+ context: codeNodes[3] ? codeNodes[3].text : null,
}
};
}