marked 14.1.1 → 14.1.2

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 v14.1.1 - a markdown parser
2
+ * marked v14.1.2 - 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;