summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-22 22:41:13 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-22 22:41:13 +0200
commit4e4bd23e2b4f6c54cf0caaf9cb3e7316d80c7f92 (patch)
tree12922020f454cffe71590e7693c2329784693b4a /test
parent62d0eb606eddfcb9a87b1447dd2e7bf8b389987f (diff)
downloadgitbook-4e4bd23e2b4f6c54cf0caaf9cb3e7316d80c7f92.zip
gitbook-4e4bd23e2b4f6c54cf0caaf9cb3e7316d80c7f92.tar.gz
gitbook-4e4bd23e2b4f6c54cf0caaf9cb3e7316d80c7f92.tar.bz2
Handle html param from code block output
Diffstat (limited to 'test')
-rw-r--r--test/codehighlighting.js2
-rw-r--r--test/plugins/replace_highlight/index.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/test/codehighlighting.js b/test/codehighlighting.js
index 5b3902b..9f392af 100644
--- a/test/codehighlighting.js
+++ b/test/codehighlighting.js
@@ -56,7 +56,7 @@ describe("Code Highlighting", function () {
it("should correctly replace highlighting for inline code with html tags", function() {
PAGE.should.be.html({
"code": {
- index: 2,
+ index: 3,
text: "code_<test>_code"
}
});
diff --git a/test/plugins/replace_highlight/index.js b/test/plugins/replace_highlight/index.js
index 2e8f71d..8586486 100644
--- a/test/plugins/replace_highlight/index.js
+++ b/test/plugins/replace_highlight/index.js
@@ -4,7 +4,10 @@ module.exports = {
process: function(blk) {
var lang = blk.kwargs.language || "code";
- return lang+"_"+blk.body+"_"+lang;
+ return {
+ body: lang+"_"+blk.body+"_"+lang,
+ html: false
+ };
}
}
}