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