Skip to content

Commit

Permalink
Merge pull request #2901 from alxbl/support-hljs
Browse files Browse the repository at this point in the history
Configs are now expanded for hexo-util/highlight to make it easier to…
  • Loading branch information
JLHwung authored Jan 7, 2018
2 parents f19629e + fa57d97 commit 14e498d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ var rLangCaption = /([^\s]+)\s*(.+)?/;
function backtickCodeBlock(data) {
var config = this.config.highlight || {};
if (!config.enable) return;

data.content = data.content.replace(rBacktick, function() {
var start = arguments[1];
var end = arguments[5];
var args = arguments[3].split('=').shift();
var content = arguments[4];

var options = {
hljs: config.hljs,
autoDetect: config.auto_detect,
gutter: config.line_number,
tab: config.tab_replace
Expand Down
1 change: 1 addition & 0 deletions lib/plugins/tag/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ module.exports = function(ctx) {
firstLine: first_line,
caption: caption,
gutter: line_number,
hljs: config.hljs,
mark: mark,
tab: config.tab_replace,
autoDetect: config.auto_detect
Expand Down

0 comments on commit 14e498d

Please sign in to comment.