|
@ -30,11 +30,12 @@ default_rules.code_block = function (tokens, idx /*, options, env */) { |
|
|
|
|
|
|
|
|
default_rules.fence = function (tokens, idx, options, env, self) { |
|
|
default_rules.fence = function (tokens, idx, options, env, self) { |
|
|
var token = tokens[idx], |
|
|
var token = tokens[idx], |
|
|
|
|
|
info = token.info ? unescapeAll(token.info).trim() : '', |
|
|
langName = '', |
|
|
langName = '', |
|
|
highlighted; |
|
|
highlighted; |
|
|
|
|
|
|
|
|
if (token.info) { |
|
|
if (info) { |
|
|
langName = unescapeAll(token.info.trim().split(/\s+/g)[0]); |
|
|
langName = info.split(/\s+/g)[0]; |
|
|
token.attrPush([ 'class', options.langPrefix + langName ]); |
|
|
token.attrPush([ 'class', options.langPrefix + langName ]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|