marked 12.0.0 → 12.0.1

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.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v12.0.0 - a markdown parser
2
+ * marked v12.0.1 - a markdown parser
3
3
  * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
@@ -922,8 +922,13 @@
922
922
  const hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
923
923
  const heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
924
924
  const bullet = /(?:[*+-]|\d{1,9}[.)])/;
925
- const lheading = edit(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/)
925
+ const lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/)
926
926
  .replace(/bull/g, bullet) // lists can interrupt
927
+ .replace(/blockCode/g, / {4}/) // indented code blocks can interrupt
928
+ .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt
929
+ .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt
930
+ .replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt
931
+ .replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
927
932
  .getRegex();
928
933
  const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
929
934
  const blockText = /^[^\n]+/;