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.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v15.0.5 - a markdown parser
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
  */
@@ -264,9 +264,13 @@ const _punctuationOrSpaceGfmStrongEm = /(?!~)[\s\p{P}\p{S}]/u;
264
264
  const _notPunctuationOrSpaceGfmStrongEm = /(?:[^\s\p{P}\p{S}]|~)/u;
265
265
  // sequences em should skip over [title](link), `code`, <html>
266
266
  const blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g;
267
- const emStrongLDelim = edit(/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, 'u')
267
+ const emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
268
+ const emStrongLDelim = edit(emStrongLDelimCore, 'u')
268
269
  .replace(/punct/g, _punctuation)
269
270
  .getRegex();
271
+ const emStrongLDelimGfm = edit(emStrongLDelimCore, 'u')
272
+ .replace(/punct/g, _punctuationGfmStrongEm)
273
+ .getRegex();
270
274
  const emStrongRDelimAstCore = '^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)' // Skip orphan inside strong
271
275
  + '|[^*]+(?=[^*])' // Consume to delim
272
276
  + '|(?!\\*)punct(\\*+)(?=[\\s]|$)' // (1) #*** can only be a Right Delimiter
@@ -373,6 +377,7 @@ const inlinePedantic = {
373
377
  const inlineGfm = {
374
378
  ...inlineNormal,
375
379
  emStrongRDelimAst: emStrongRDelimAstGfm,
380
+ emStrongLDelim: emStrongLDelimGfm,
376
381
  url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, 'i')
377
382
  .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)
378
383
  .getRegex(),
@@ -498,7 +503,7 @@ function rtrim(str, c, invert) {
498
503
  // Step left until we fail to match the invert condition.
499
504
  while (suffLen < l) {
500
505
  const currChar = str.charAt(l - suffLen - 1);
501
- if (currChar === c && !invert) {
506
+ if (currChar === c && true) {
502
507
  suffLen++;
503
508
  }
504
509
  else {