marked 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/marked.cjs +7 -7
- package/lib/marked.cjs.map +1 -1
- package/lib/marked.esm.js +7 -7
- package/lib/marked.esm.js.map +1 -1
- package/lib/marked.umd.js +7 -7
- package/lib/marked.umd.js.map +1 -1
- package/marked.min.js +3 -3
- package/package.json +6 -6
package/lib/marked.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* marked v8.0.
|
|
2
|
+
* marked v8.0.1 - a markdown parser
|
|
3
3
|
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
|
4
4
|
* https://github.com/markedjs/marked
|
|
5
5
|
*/
|
|
@@ -376,7 +376,7 @@ class _Tokenizer {
|
|
|
376
376
|
let indent = 0;
|
|
377
377
|
if (this.options.pedantic) {
|
|
378
378
|
indent = 2;
|
|
379
|
-
itemContents = line.
|
|
379
|
+
itemContents = line.trimStart();
|
|
380
380
|
}
|
|
381
381
|
else {
|
|
382
382
|
indent = cap[2].search(/[^ ]/); // Find first non-space char
|
|
@@ -481,9 +481,9 @@ class _Tokenizer {
|
|
|
481
481
|
list.raw += raw;
|
|
482
482
|
}
|
|
483
483
|
// Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic
|
|
484
|
-
list.items[list.items.length - 1].raw = raw.
|
|
485
|
-
list.items[list.items.length - 1].text = itemContents.
|
|
486
|
-
list.raw = list.raw.
|
|
484
|
+
list.items[list.items.length - 1].raw = raw.trimEnd();
|
|
485
|
+
list.items[list.items.length - 1].text = itemContents.trimEnd();
|
|
486
|
+
list.raw = list.raw.trimEnd();
|
|
487
487
|
// Item child tokens handled here at end because we needed to have the final item to trim it first
|
|
488
488
|
for (let i = 0; i < list.items.length; i++) {
|
|
489
489
|
this.lexer.state.top = false;
|
|
@@ -1887,12 +1887,12 @@ class _Parser {
|
|
|
1887
1887
|
else {
|
|
1888
1888
|
item.tokens.unshift({
|
|
1889
1889
|
type: 'text',
|
|
1890
|
-
text: checkbox
|
|
1890
|
+
text: checkbox + ' '
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
1894
|
else {
|
|
1895
|
-
itemBody += checkbox;
|
|
1895
|
+
itemBody += checkbox + ' ';
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
1898
|
itemBody += this.parse(item.tokens, loose);
|