marked 14.1.1 → 14.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/bin/main.js +8 -4
- package/lib/marked.cjs +7 -2
- package/lib/marked.cjs.map +1 -1
- package/lib/marked.esm.js +7 -2
- package/lib/marked.esm.js.map +1 -1
- package/lib/marked.umd.js +7 -2
- package/lib/marked.umd.js.map +1 -1
- package/man/marked.1 +1 -1
- package/marked.min.js +2 -2
- package/package.json +11 -11
package/lib/marked.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* marked v14.1.
|
|
2
|
+
* marked v14.1.3 - a markdown parser
|
|
3
3
|
* Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
|
|
4
4
|
* https://github.com/markedjs/marked
|
|
5
5
|
*/
|
|
@@ -447,6 +447,7 @@
|
|
|
447
447
|
const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);
|
|
448
448
|
const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\`\`\`|~~~)`);
|
|
449
449
|
const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);
|
|
450
|
+
const htmlBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}<[a-z].*>`, 'i');
|
|
450
451
|
// Check if following lines should be included in List Item
|
|
451
452
|
while (src) {
|
|
452
453
|
const rawLine = src.split('\n', 1)[0];
|
|
@@ -468,6 +469,10 @@
|
|
|
468
469
|
if (headingBeginRegex.test(nextLine)) {
|
|
469
470
|
break;
|
|
470
471
|
}
|
|
472
|
+
// End list item if found start of html block
|
|
473
|
+
if (htmlBeginRegex.test(nextLine)) {
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
471
476
|
// End list item if found start of new bullet
|
|
472
477
|
if (nextBulletRegex.test(nextLine)) {
|
|
473
478
|
break;
|
|
@@ -1123,7 +1128,7 @@
|
|
|
1123
1128
|
const punctuation = edit(/^((?![*_])[\spunctuation])/, 'u')
|
|
1124
1129
|
.replace(/punctuation/g, _punctuation).getRegex();
|
|
1125
1130
|
// sequences em should skip over [title](link), `code`, <html>
|
|
1126
|
-
const blockSkip = /\[[^[\]]*?\]\([
|
|
1131
|
+
const blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g;
|
|
1127
1132
|
const emStrongLDelim = edit(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, 'u')
|
|
1128
1133
|
.replace(/punct/g, _punctuation)
|
|
1129
1134
|
.getRegex();
|