marked 9.1.2 → 9.1.3
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/README.md +3 -3
- package/lib/marked.cjs +5 -5
- package/lib/marked.cjs.map +1 -1
- package/lib/marked.esm.js +5 -5
- package/lib/marked.esm.js.map +1 -1
- package/lib/marked.umd.js +5 -5
- package/lib/marked.umd.js.map +1 -1
- package/man/marked.1 +1 -1
- package/marked.min.js +2 -2
- package/package.json +8 -8
package/lib/marked.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* marked v9.1.
|
|
2
|
+
* marked v9.1.3 - a markdown parser
|
|
3
3
|
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
|
4
4
|
* https://github.com/markedjs/marked
|
|
5
5
|
*/
|
|
@@ -976,7 +976,7 @@ block.lheading = edit(block.lheading)
|
|
|
976
976
|
.getRegex();
|
|
977
977
|
block.paragraph = edit(block._paragraph)
|
|
978
978
|
.replace('hr', block.hr)
|
|
979
|
-
.replace('heading', ' {0,3}#{1,6}
|
|
979
|
+
.replace('heading', ' {0,3}#{1,6}(?:\\s|$)')
|
|
980
980
|
.replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
|
|
981
981
|
.replace('|table', '')
|
|
982
982
|
.replace('blockquote', ' {0,3}>')
|
|
@@ -1003,7 +1003,7 @@ block.gfm = {
|
|
|
1003
1003
|
};
|
|
1004
1004
|
block.gfm.table = edit(block.gfm.table)
|
|
1005
1005
|
.replace('hr', block.hr)
|
|
1006
|
-
.replace('heading', ' {0,3}#{1,6}
|
|
1006
|
+
.replace('heading', ' {0,3}#{1,6}(?:\\s|$)')
|
|
1007
1007
|
.replace('blockquote', ' {0,3}>')
|
|
1008
1008
|
.replace('code', ' {4}[^\\n]')
|
|
1009
1009
|
.replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
|
|
@@ -1013,7 +1013,7 @@ block.gfm.table = edit(block.gfm.table)
|
|
|
1013
1013
|
.getRegex();
|
|
1014
1014
|
block.gfm.paragraph = edit(block._paragraph)
|
|
1015
1015
|
.replace('hr', block.hr)
|
|
1016
|
-
.replace('heading', ' {0,3}#{1,6}
|
|
1016
|
+
.replace('heading', ' {0,3}#{1,6}(?:\\s|$)')
|
|
1017
1017
|
.replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
|
|
1018
1018
|
.replace('table', block.gfm.table) // interrupt paragraphs with table
|
|
1019
1019
|
.replace('blockquote', ' {0,3}>')
|
|
@@ -1301,7 +1301,7 @@ class _Lexer {
|
|
|
1301
1301
|
src = src.substring(token.raw.length);
|
|
1302
1302
|
if (token.raw.length === 1 && tokens.length > 0) {
|
|
1303
1303
|
// if there's a single \n as a spacer, it's terminating the last line,
|
|
1304
|
-
// so move it there so that we don't get
|
|
1304
|
+
// so move it there so that we don't get unnecessary paragraph tags
|
|
1305
1305
|
tokens[tokens.length - 1].raw += '\n';
|
|
1306
1306
|
}
|
|
1307
1307
|
else {
|