markdown-it
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -0,1 +1,9 @@ | ||
2.2.1 / 2014-12-29 | ||
------------------ | ||
- Added development info. | ||
- Fixed line breaks in definitions lists. | ||
- .use() now pass any number of params to plugins. | ||
2.2.0 / 2014-12-28 | ||
@@ -2,0 +10,0 @@ ------------------ |
@@ -335,4 +335,5 @@ // Main perser class | ||
**/ | ||
MarkdownIt.prototype.use = function (plugin, options) { | ||
plugin(this, options); | ||
MarkdownIt.prototype.use = function (plugin /*, options, ... */) { | ||
var args = [ this ].concat(Array.prototype.slice.call(arguments, 1)); | ||
plugin.apply(plugin, args); | ||
return this; | ||
@@ -339,0 +340,0 @@ }; |
@@ -135,3 +135,3 @@ /** | ||
} | ||
if (tokens[idx + 1].type === 'list_item_close') { | ||
if (tokens[idx + 1].type.slice(-5) === 'close') { | ||
return ''; | ||
@@ -147,3 +147,4 @@ } | ||
var title = tokens[idx].title ? (' title="' + escapeHtml(replaceEntities(tokens[idx].title)) + '"') : ''; | ||
return '<a href="' + escapeHtml(tokens[idx].href) + '"' + title + '>'; | ||
var target = tokens[idx].target ? (' target="' + escapeHtml(tokens[idx].target) + '"') : ''; | ||
return '<a href="' + escapeHtml(tokens[idx].href) + '"' + title + target + '>'; | ||
}; | ||
@@ -150,0 +151,0 @@ rules.link_close = function (/* tokens, idx, options, env */) { |
@@ -135,2 +135,3 @@ // Replace link-like texts with link nodes. | ||
href: links[ln].url, | ||
target: '', | ||
title: '', | ||
@@ -137,0 +138,0 @@ level: level++ |
@@ -36,2 +36,3 @@ // Process autolinks '<protocol:...>' | ||
href: fullUrl, | ||
target: '', | ||
level: state.level | ||
@@ -64,2 +65,3 @@ }); | ||
href: fullUrl, | ||
target: '', | ||
level: state.level | ||
@@ -66,0 +68,0 @@ }); |
@@ -163,2 +163,3 @@ // Process [links](<to> "stuff") | ||
href: href, | ||
target: '', | ||
title: title, | ||
@@ -165,0 +166,0 @@ level: state.level++ |
{ | ||
"name": "markdown-it", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Markdown-it - modern pluggable markdown parser.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -43,6 +43,10 @@ # markdown-it | ||
See __[API documentation](https://markdown-it.github.io/markdown-it/)__ for more | ||
info and examples. | ||
See also: | ||
- __[API documentation](https://markdown-it.github.io/markdown-it/)__ - for more | ||
info and examples. | ||
- [Development info](https://github.com/markdown-it/markdown-it/tree/master/docs) - | ||
for plugins writers. | ||
### Simple | ||
@@ -156,3 +160,6 @@ | ||
If you are going to write plugins - take a look at | ||
[Development info](https://github.com/markdown-it/markdown-it/tree/master/docs). | ||
## Syntax extensions | ||
@@ -159,0 +166,0 @@ |
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
592216
16136
263