markdown-it
Advanced tools
Comparing version 12.1.0 to 12.2.0
@@ -9,2 +9,10 @@ # Changelog | ||
## [12.2.0] - 2021-08-02 | ||
### Added | ||
- Ordered lists: add order value to token info. | ||
### Fixed | ||
- Always suffix indented code block with a newline, #799. | ||
## [12.1.0] - 2021-07-01 | ||
@@ -571,2 +579,3 @@ ### Changed | ||
[12.2.0]: https://github.com/markdown-it/markdown-it/compare/12.1.0...12.2.0 | ||
[12.1.0]: https://github.com/markdown-it/markdown-it/compare/12.0.6...12.1.0 | ||
@@ -573,0 +582,0 @@ [12.0.6]: https://github.com/markdown-it/markdown-it/compare/12.0.5...12.0.6 |
@@ -30,3 +30,3 @@ // Code block (4 spaces padded) | ||
token = state.push('code_block', 'code', 0); | ||
token.content = state.getLines(startLine, last, 4 + state.blkIndent, true); | ||
token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\n'; | ||
token.map = [ startLine, state.line ]; | ||
@@ -33,0 +33,0 @@ |
@@ -164,3 +164,3 @@ // Lists | ||
start = state.bMarks[startLine] + state.tShift[startLine]; | ||
markerValue = Number(state.src.substr(start, posAfterMarker - start - 1)); | ||
markerValue = Number(state.src.slice(start, posAfterMarker - 1)); | ||
@@ -258,2 +258,5 @@ // If we're starting a new ordered list right after | ||
token.map = itemLines = [ startLine, 0 ]; | ||
if (isOrdered) { | ||
token.info = state.src.slice(start, posAfterMarker - 1); | ||
} | ||
@@ -335,2 +338,3 @@ // change current state, then restore it after parser subcall | ||
if (posAfterMarker < 0) { break; } | ||
start = state.bMarks[nextLine] + state.tShift[nextLine]; | ||
} else { | ||
@@ -337,0 +341,0 @@ posAfterMarker = skipBulletListMarker(state, nextLine); |
@@ -91,2 +91,3 @@ // Token class | ||
* - The value "auto" for autolink "link_open" and "link_close" tokens | ||
* - The string value of the item marker for ordered-list "list_item_open" tokens | ||
**/ | ||
@@ -93,0 +94,0 @@ this.info = ''; |
{ | ||
"name": "markdown-it", | ||
"version": "12.1.0", | ||
"version": "12.2.0", | ||
"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
572773
13711