summaryrefslogtreecommitdiffstats
path: root/test/plugins/highlight/index.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2015-09-14 11:41:01 +0200
committerSamy Pesse <samypesse@gmail.com>2015-09-14 11:41:01 +0200
commit2c08ccad870efbf1a964b08c30da5de0c025a0ad (patch)
tree453765f2230508957e38eadbe0d330bef4d818d6 /test/plugins/highlight/index.js
parentfa4e234bab15db4b0a8a0a13f041ef5869a2458b (diff)
downloadgitbook-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.js4
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;
}
}
}