diff options
author | Samy Pesse <samypesse@gmail.com> | 2015-09-14 11:41:01 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2015-09-14 11:41:01 +0200 |
commit | 2c08ccad870efbf1a964b08c30da5de0c025a0ad (patch) | |
tree | 453765f2230508957e38eadbe0d330bef4d818d6 /lib/utils/page.js | |
parent | fa4e234bab15db4b0a8a0a13f041ef5869a2458b (diff) | |
download | gitbook-2c08ccad870efbf1a964b08c30da5de0c025a0ad.zip gitbook-2c08ccad870efbf1a964b08c30da5de0c025a0ad.tar.gz gitbook-2c08ccad870efbf1a964b08c30da5de0c025a0ad.tar.bz2 |
Pass language as kwargs to code block
Improve tests for extending code highlighting
Diffstat (limited to 'lib/utils/page.js')
-rw-r--r-- | lib/utils/page.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js index c4af715..5b4eca8 100644 --- a/lib/utils/page.js +++ b/lib/utils/page.js @@ -241,7 +241,12 @@ function normalizeHtml(src, options) { .value(); var source = $(this).text(); - var html = options.book.template.applyBlock('code', source).body; + var html = options.book.template.applyBlock('code', { + body: source, + kwargs: { + language: lang + } + }).body; $(this).html(html); }); |