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 /test/plugins/highlight/index.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 'test/plugins/highlight/index.js')
-rw-r--r-- | test/plugins/highlight/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/plugins/highlight/index.js b/test/plugins/highlight/index.js index 01202f2..25f9642 100644 --- a/test/plugins/highlight/index.js +++ b/test/plugins/highlight/index.js @@ -2,7 +2,9 @@ module.exports = { blocks: { "code": { process: function(blk) { - return "code_"+blk.body+"_code"; + var lang = blk.kwargs.language || 'code'; + + return lang+"_"+blk.body+"_"+lang; } } } |