@ai-matrx/content-ir 0.19.11 → 0.19.13

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/dist/source.cjs CHANGED
@@ -2641,6 +2641,17 @@ var HTML_BLOCK_NAMES = "address|article|aside|base|basefont|blockquote|body|capt
2641
2641
  var HTML_BLOCK_TAG = new RegExp(`^</?(?:${HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
2642
2642
  var ATTRIBUTE = `\\s+[A-Za-z_:][A-Za-z0-9_.:-]*(?:\\s*=\\s*(?:[^\\s"'=<>\`]+|'[^']*'|"[^"]*"))?`;
2643
2643
  var HTML_COMPLETE_TAG = new RegExp(`^(?:<[A-Za-z][A-Za-z0-9-]*(?:${ATTRIBUTE})*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*>)\\s*$`);
2644
+ var HTML_BLOCK_NAME_SET = /* @__PURE__ */ new Set([
2645
+ // Condition 1 (raw text) and condition 6 (block) tag names — CommonMark 0.31.
2646
+ "script",
2647
+ "pre",
2648
+ "style",
2649
+ "textarea",
2650
+ ...HTML_BLOCK_NAMES.replace("h[1-6]", "h1|h2|h3|h4|h5|h6").split("|")
2651
+ ]);
2652
+ function isHtmlBlockTagName(name) {
2653
+ return HTML_BLOCK_NAME_SET.has(name.toLowerCase());
2654
+ }
2644
2655
  function startsHtmlBlock(trimmed) {
2645
2656
  if (!trimmed.startsWith("<")) return false;
2646
2657
  return HTML_RAW.test(trimmed) || HTML_COMMENT_ETC.test(trimmed) || HTML_BLOCK_TAG.test(trimmed) || HTML_COMPLETE_TAG.test(trimmed);
@@ -2785,6 +2796,7 @@ exports.findTableEnd = findTableEnd;
2785
2796
  exports.findTableStart = findTableStart;
2786
2797
  exports.isEscapedBracketMath = isEscapedBracketMath;
2787
2798
  exports.isGfmDelimiterRow = isGfmDelimiterRow;
2799
+ exports.isHtmlBlockTagName = isHtmlBlockTagName;
2788
2800
  exports.isMathPlaceholder = isMathPlaceholder;
2789
2801
  exports.isPipeLedRow = isPipeLedRow;
2790
2802
  exports.isSingleDollarMath = isSingleDollarMath;