Skip to content

Commit

Permalink
Update highlight.js dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Sep 20, 2017
1 parent 2c48e39 commit 43999f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Kerouac.prototype.defaultConfiguration = function() {
});

// syntax highlighter
highlight.configure({ classPrefix: '' });

this.highlight(function(code, lang) {
if (lang) return highlight.highlight(lang, code).value;
return highlight.highlightAuto(code).value;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"diveSync": "0.3.x",
"js-yaml": "3.x.x",
"marked-engine": "0.2.x",
"highlight.js": "7.x.x",
"highlight.js": "9.x.x",
"debug": "3.x.x"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('kerouac', function() {
var code = "function foo() {};"

var out = site.highlight(code);
expect(out).to.equal('<span class=\"function\"><span class=\"keyword\">function</span> <span class=\"title\">foo</span><span class=\"params\">()</span> {</span>};');
expect(out).to.equal('<span class=\"function\"><span class=\"keyword\">function</span> <span class=\"title\">foo</span><span class=\"params\">()</span> </span>{};');
});
});

Expand Down

0 comments on commit 43999f0

Please sign in to comment.