markdown-it
Advanced tools
Comparing version 12.0.3 to 12.0.4
@@ -9,2 +9,8 @@ # Changelog | ||
## [12.0.4] - 2020-12-20 | ||
### Fixed | ||
- Fix crash introduced in `12.0.3` when processing strikethrough (`~~`) and similar plugins, #742. | ||
- Avoid fenced token mutation, #745. | ||
## [12.0.3] - 2020-12-07 | ||
@@ -549,2 +555,3 @@ ### Fixed | ||
[12.0.4]: https://github.com/markdown-it/markdown-it/compare/12.0.3...12.0.4 | ||
[12.0.3]: https://github.com/markdown-it/markdown-it/compare/12.0.2...12.0.3 | ||
@@ -551,0 +558,0 @@ [12.0.2]: https://github.com/markdown-it/markdown-it/compare/12.0.1...12.0.2 |
@@ -63,3 +63,3 @@ /** | ||
// If language exists, inject class gently, without modifying original token. | ||
// May be, one day we will add .clone() for token and simplify this part, but | ||
// May be, one day we will add .deepClone() for token and simplify this part, but | ||
// now we prefer to keep things local. | ||
@@ -73,2 +73,3 @@ if (info) { | ||
} else { | ||
tmpAttrs[i] = tmpAttrs[i].slice(); | ||
tmpAttrs[i][1] += ' ' + options.langPrefix + langName; | ||
@@ -75,0 +76,0 @@ } |
@@ -32,2 +32,6 @@ // For each opening emphasis-like marker find a matching closing one | ||
openerIdx = closerIdx - closer.jump - 1; | ||
// avoid crash if `closer.jump` is pointing outside of the array, see #742 | ||
if (openerIdx < -1) openerIdx = -1; | ||
newMinOpenerIdx = openerIdx; | ||
@@ -34,0 +38,0 @@ |
@@ -35,4 +35,4 @@ // ~~strike through~~ | ||
marker: marker, | ||
length: 0, // disable "rule of 3" length checks meant for emphasis | ||
jump: i, | ||
length: 0, // disable "rule of 3" length checks meant for emphasis | ||
jump: i / 2, // for `~~` 1 marker = 2 characters | ||
token: state.tokens.length - 1, | ||
@@ -39,0 +39,0 @@ end: -1, |
{ | ||
"name": "markdown-it", | ||
"version": "12.0.3", | ||
"version": "12.0.4", | ||
"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
569269
13666