marked 9.1.2 → 9.1.4

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 v9.1.2 - a markdown parser
2
+ * marked v9.1.4 - a markdown parser
3
3
  * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
@@ -982,7 +982,7 @@
982
982
  .getRegex();
983
983
  block.paragraph = edit(block._paragraph)
984
984
  .replace('hr', block.hr)
985
- .replace('heading', ' {0,3}#{1,6} ')
985
+ .replace('heading', ' {0,3}#{1,6}(?:\\s|$)')
986
986
  .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
987
987
  .replace('|table', '')
988
988
  .replace('blockquote', ' {0,3}>')
@@ -1009,7 +1009,7 @@
1009
1009
  };
1010
1010
  block.gfm.table = edit(block.gfm.table)
1011
1011
  .replace('hr', block.hr)
1012
- .replace('heading', ' {0,3}#{1,6} ')
1012
+ .replace('heading', ' {0,3}#{1,6}(?:\\s|$)')
1013
1013
  .replace('blockquote', ' {0,3}>')
1014
1014
  .replace('code', ' {4}[^\\n]')
1015
1015
  .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n')
@@ -1019,7 +1019,7 @@
1019
1019
  .getRegex();
1020
1020
  block.gfm.paragraph = edit(block._paragraph)
1021
1021
  .replace('hr', block.hr)
1022
- .replace('heading', ' {0,3}#{1,6} ')
1022
+ .replace('heading', ' {0,3}#{1,6}(?:\\s|$)')
1023
1023
  .replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
1024
1024
  .replace('table', block.gfm.table) // interrupt paragraphs with table
1025
1025
  .replace('blockquote', ' {0,3}>')
@@ -1307,7 +1307,7 @@
1307
1307
  src = src.substring(token.raw.length);
1308
1308
  if (token.raw.length === 1 && tokens.length > 0) {
1309
1309
  // if there's a single \n as a spacer, it's terminating the last line,
1310
- // so move it there so that we don't get unecessary paragraph tags
1310
+ // so move it there so that we don't get unnecessary paragraph tags
1311
1311
  tokens[tokens.length - 1].raw += '\n';
1312
1312
  }
1313
1313
  else {