marked 15.0.5 → 15.0.6
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 +8 -3
- package/lib/marked.cjs.map +1 -1
- package/lib/marked.esm.js +8 -3
- package/lib/marked.esm.js.map +1 -1
- package/lib/marked.umd.js +8 -3
- package/lib/marked.umd.js.map +1 -1
- package/man/marked.1 +1 -1
- package/marked.min.js +2 -2
- package/package.json +5 -5
package/lib/marked.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* marked v15.0.
|
|
2
|
+
* marked v15.0.6 - a markdown parser
|
|
3
3
|
* Copyright (c) 2011-2025, Christopher Jeffrey. (MIT Licensed)
|
|
4
4
|
* https://github.com/markedjs/marked
|
|
5
5
|
*/
|
|
@@ -270,9 +270,13 @@
|
|
|
270
270
|
const _notPunctuationOrSpaceGfmStrongEm = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
271
271
|
// sequences em should skip over [title](link), `code`, <html>
|
|
272
272
|
const blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g;
|
|
273
|
-
const
|
|
273
|
+
const emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
|
|
274
|
+
const emStrongLDelim = edit(emStrongLDelimCore, 'u')
|
|
274
275
|
.replace(/punct/g, _punctuation)
|
|
275
276
|
.getRegex();
|
|
277
|
+
const emStrongLDelimGfm = edit(emStrongLDelimCore, 'u')
|
|
278
|
+
.replace(/punct/g, _punctuationGfmStrongEm)
|
|
279
|
+
.getRegex();
|
|
276
280
|
const emStrongRDelimAstCore = '^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)' // Skip orphan inside strong
|
|
277
281
|
+ '|[^*]+(?=[^*])' // Consume to delim
|
|
278
282
|
+ '|(?!\\*)punct(\\*+)(?=[\\s]|$)' // (1) #*** can only be a Right Delimiter
|
|
@@ -379,6 +383,7 @@
|
|
|
379
383
|
const inlineGfm = {
|
|
380
384
|
...inlineNormal,
|
|
381
385
|
emStrongRDelimAst: emStrongRDelimAstGfm,
|
|
386
|
+
emStrongLDelim: emStrongLDelimGfm,
|
|
382
387
|
url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, 'i')
|
|
383
388
|
.replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)
|
|
384
389
|
.getRegex(),
|
|
@@ -504,7 +509,7 @@
|
|
|
504
509
|
// Step left until we fail to match the invert condition.
|
|
505
510
|
while (suffLen < l) {
|
|
506
511
|
const currChar = str.charAt(l - suffLen - 1);
|
|
507
|
-
if (currChar === c &&
|
|
512
|
+
if (currChar === c && true) {
|
|
508
513
|
suffLen++;
|
|
509
514
|
}
|
|
510
515
|
else {
|