summaryrefslogtreecommitdiffstats
path: root/lib/utils
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-22 22:46:19 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-22 22:46:19 +0200
commitf0ddb6e89f78558814e3a3b4ac6c919b8d5ac3a8 (patch)
tree019121501dc7017f3a32f3f2ada5c0207494e7b9 /lib/utils
parent0e9beeae14682b8124db3df580a21e6a76cc0805 (diff)
parent2b408db7cb18fb8cea8e1932e70926e84cd64136 (diff)
downloadgitbook-f0ddb6e89f78558814e3a3b4ac6c919b8d5ac3a8.zip
gitbook-f0ddb6e89f78558814e3a3b4ac6c919b8d5ac3a8.tar.gz
gitbook-f0ddb6e89f78558814e3a3b4ac6c919b8d5ac3a8.tar.bz2
Merge branch 'fix/inline_code_html'
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/page.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js
index a17c6a2..2c57421 100644
--- a/lib/utils/page.js
+++ b/lib/utils/page.js
@@ -244,14 +244,15 @@ function normalizeHtml(src, options) {
.value();
var source = $(this).text();
- var html = options.book.template.applyBlock("code", {
+ var blk = options.book.template.applyBlock("code", {
body: source,
kwargs: {
language: lang
}
- }).body;
+ });
- $(this).html(html);
+ if (blk.html === false) $(this).text(blk.body);
+ else $(this).html(blk.body);
});
// Replace glossary terms