|
|
@ -28,7 +28,7 @@ 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, slf) { |
|
|
|
var token = tokens[idx], |
|
|
|
info = token.info ? unescapeAll(token.info).trim() : '', |
|
|
|
langName = '', |
|
|
@ -45,13 +45,13 @@ default_rules.fence = function (tokens, idx, options, env, self) { |
|
|
|
highlighted = escapeHtml(token.content); |
|
|
|
} |
|
|
|
|
|
|
|
return '<pre><code' + self.renderAttrs(token) + '>' |
|
|
|
return '<pre><code' + slf.renderAttrs(token) + '>' |
|
|
|
+ highlighted |
|
|
|
+ '</code></pre>\n'; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
default_rules.image = function (tokens, idx, options, env, self) { |
|
|
|
default_rules.image = function (tokens, idx, options, env, slf) { |
|
|
|
var token = tokens[idx]; |
|
|
|
|
|
|
|
// "alt" attr MUST be set, even if empty. Because it's mandatory and
|
|
|
@ -60,9 +60,9 @@ default_rules.image = function (tokens, idx, options, env, self) { |
|
|
|
// Replace content with actual value
|
|
|
|
|
|
|
|
token.attrs[token.attrIndex('alt')][1] = |
|
|
|
self.renderInlineAsText(token.children, options, env); |
|
|
|
slf.renderInlineAsText(token.children, options, env); |
|
|
|
|
|
|
|
return self.renderToken(tokens, idx, options); |
|
|
|
return slf.renderToken(tokens, idx, options); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|