marked 14.1.1 → 14.1.2
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 +6 -1
- package/lib/marked.cjs.map +1 -1
- package/lib/marked.esm.js +6 -1
- package/lib/marked.esm.js.map +1 -1
- package/lib/marked.umd.js +6 -1
- package/lib/marked.umd.js.map +1 -1
- package/man/marked.1 +1 -1
- package/marked.min.js +2 -2
- package/package.json +2 -2
package/lib/marked.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* marked v14.1.
|
|
2
|
+
* marked v14.1.2 - a markdown parser
|
|
3
3
|
* Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
|
|
4
4
|
* https://github.com/markedjs/marked
|
|
5
5
|
*/
|
|
@@ -441,6 +441,7 @@ class _Tokenizer {
|
|
|
441
441
|
const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);
|
|
442
442
|
const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\`\`\`|~~~)`);
|
|
443
443
|
const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);
|
|
444
|
+
const htmlBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}<[a-z].*>`, 'i');
|
|
444
445
|
// Check if following lines should be included in List Item
|
|
445
446
|
while (src) {
|
|
446
447
|
const rawLine = src.split('\n', 1)[0];
|
|
@@ -462,6 +463,10 @@ class _Tokenizer {
|
|
|
462
463
|
if (headingBeginRegex.test(nextLine)) {
|
|
463
464
|
break;
|
|
464
465
|
}
|
|
466
|
+
// End list item if found start of html block
|
|
467
|
+
if (htmlBeginRegex.test(nextLine)) {
|
|
468
|
+
break;
|
|
469
|
+
}
|
|
465
470
|
// End list item if found start of new bullet
|
|
466
471
|
if (nextBulletRegex.test(nextLine)) {
|
|
467
472
|
break;
|