markdown-it
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -0,1 +1,7 @@ | ||
6.1.1 / 2016-06-21 | ||
------------------ | ||
- Render `code_inline` & `code_block` attributes if exist. | ||
6.1.0 / 2016-06-19 | ||
@@ -2,0 +8,0 @@ ------------------ |
@@ -21,9 +21,19 @@ /** | ||
default_rules.code_inline = function (tokens, idx /*, options, env */) { | ||
return '<code>' + escapeHtml(tokens[idx].content) + '</code>'; | ||
default_rules.code_inline = function (tokens, idx, options, env, slf) { | ||
var token = tokens[idx], | ||
attrs = slf.renderAttrs(token); | ||
return '<code' + (attrs ? ' ' + attrs : '') + '>' + | ||
escapeHtml(tokens[idx].content) + | ||
'</code>'; | ||
}; | ||
default_rules.code_block = function (tokens, idx /*, options, env */) { | ||
return '<pre><code>' + escapeHtml(tokens[idx].content) + '</code></pre>\n'; | ||
default_rules.code_block = function (tokens, idx, options, env, slf) { | ||
var token = tokens[idx], | ||
attrs = slf.renderAttrs(token); | ||
return '<pre' + (attrs ? ' ' + attrs : '') + '><code>' + | ||
escapeHtml(tokens[idx].content) + | ||
'</code></pre>\n'; | ||
}; | ||
@@ -30,0 +40,0 @@ |
{ | ||
"name": "markdown-it", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "Markdown-it - modern pluggable markdown parser.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
525026
11401