markdown-it
Advanced tools
Comparing version
@@ -0,1 +1,8 @@ | ||
2.1.1 / 2014-12-22 | ||
------------------ | ||
- Refreshed browser builds, missed in prev release. | ||
- Minor changes. | ||
2.1.0 / 2014-12-21 | ||
@@ -2,0 +9,0 @@ ------------------ |
@@ -127,2 +127,7 @@ // Utilities | ||
function arrayReplaceAt(src, pos, newElements) { | ||
return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); | ||
} | ||
exports.assign = assign; | ||
@@ -136,1 +141,2 @@ exports.isString = isString; | ||
exports.escapeHtml = escapeHtml; | ||
exports.arrayReplaceAt = arrayReplaceAt; |
@@ -6,2 +6,3 @@ // Main perser class | ||
var utils = require('./common/utils'); | ||
var assign = require('./common/utils').assign; | ||
@@ -55,2 +56,5 @@ var isString = require('./common/utils').isString; | ||
// Expose utils for easy acces from plugins | ||
this.utils = utils; | ||
this.options = {}; | ||
@@ -57,0 +61,0 @@ this.configure(config[presetName]); |
@@ -6,2 +6,5 @@ // Enclose abbreviations in <abbr> tags | ||
var arrayReplaceAt = require('../common/utils').arrayReplaceAt; | ||
var PUNCT_CHARS = ' \n()[]\'".,!?-'; | ||
@@ -86,5 +89,5 @@ | ||
// replace current node | ||
blockTokens[j].children = tokens = [].concat(tokens.slice(0, i), nodes, tokens.slice(i + 1)); | ||
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes); | ||
} | ||
} | ||
}; |
@@ -8,3 +8,4 @@ // Replace link-like texts with link nodes. | ||
var Autolinker = require('autolinker'); | ||
var Autolinker = require('autolinker'); | ||
var arrayReplaceAt = require('../common/utils').arrayReplaceAt; | ||
@@ -158,3 +159,3 @@ | ||
// replace current node | ||
blockTokens[j].children = tokens = [].concat(tokens.slice(0, i), nodes, tokens.slice(i + 1)); | ||
blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes); | ||
} | ||
@@ -161,0 +162,0 @@ } |
{ | ||
"name": "markdown-it", | ||
"version": "2.1.0", | ||
"description": "Markdown parser with plugins", | ||
"version": "2.1.1", | ||
"description": "Markdown-it - modern pluggable markdown parser.", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "markdown", |
@@ -15,3 +15,3 @@ # markdown-it | ||
- [High speed](#benchmark)! | ||
- [Community plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin) on npm. | ||
- Community written __[plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin)__ and [utilities](https://www.npmjs.org/browse/keyword/markdown-it) on npm. | ||
@@ -18,0 +18,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
555384
1.78%14880
1.12%