@ai-matrx/content-ir 0.19.17 → 0.19.19

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
@@ -999,6 +999,210 @@ var XmlContainerTracker = class {
999
999
  }
1000
1000
  };
1001
1001
 
1002
+ // source/gfm-table.ts
1003
+ function splitRowSegments(line) {
1004
+ const segments = [];
1005
+ let start = 0;
1006
+ for (let i = 0; i < line.length; i += 1) {
1007
+ const ch = line[i];
1008
+ if (ch === "\\") {
1009
+ i += 1;
1010
+ continue;
1011
+ }
1012
+ if (ch === "|") {
1013
+ segments.push(line.slice(start, i));
1014
+ start = i + 1;
1015
+ }
1016
+ }
1017
+ segments.push(line.slice(start));
1018
+ return segments;
1019
+ }
1020
+ function rowCells(line) {
1021
+ const cells = splitRowSegments(line).map((cell) => cell.trim());
1022
+ if (cells.length > 1 && cells[0] === "") cells.shift();
1023
+ if (cells.length > 1 && cells[cells.length - 1] === "") cells.pop();
1024
+ else if (cells.length === 1 && cells[0] === "" && !line.includes("|")) cells.pop();
1025
+ return cells;
1026
+ }
1027
+ function unescapeCellPipes(cell) {
1028
+ return cell.replace(/\\\|/g, "|");
1029
+ }
1030
+ var BLOCK_START = /^(?:[-+*](?:\s|$)|\d{1,9}[.)](?:\s|$)|>|#{1,6}(?:\s|$)|(?:-\s*){3,}$|(?:\*\s*){3,}$|(?:_\s*){3,}$|\[\^[^\]\s]+\]:)/;
1031
+ var startsBlock = (trimmed) => BLOCK_START.test(trimmed) || opensStrictFence(trimmed) || startsHtmlBlock(trimmed);
1032
+ var HTML_RAW = /^<(?:script|pre|style|textarea)(?:[\s>]|$)/i;
1033
+ var HTML_COMMENT_ETC = /^(?:<!--|<\?|<![A-Za-z]|<!\[CDATA\[)/;
1034
+ var HTML_BLOCK_NAMES = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
1035
+ var HTML_BLOCK_TAG = new RegExp(`^</?(?:${HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
1036
+ var ATTRIBUTE = `\\s+[A-Za-z_:][A-Za-z0-9_.:-]*(?:\\s*=\\s*(?:[^\\s"'=<>\`]+|'[^']*'|"[^"]*"))?`;
1037
+ var HTML_COMPLETE_TAG = new RegExp(`^(?:<[A-Za-z][A-Za-z0-9-]*(?:${ATTRIBUTE})*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*>)\\s*$`);
1038
+ var STRIPPED_HTML_BLOCK_NAMES = "address|article|aside|base|basefont|body|center|dialog|dir|fieldset|footer|form|frame|frameset|head|header|html|iframe|legend|link|main|menu|menuitem|nav|noframes|optgroup|option|param|search|title|track";
1039
+ var STRIPPED_HTML_BLOCK_TAG = new RegExp(`^</?(?:${STRIPPED_HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
1040
+ function opensStrippedHtmlBlock(trimmed) {
1041
+ return STRIPPED_HTML_BLOCK_TAG.test(trimmed);
1042
+ }
1043
+ var HTML_BLOCK_NAME_SET = /* @__PURE__ */ new Set([
1044
+ // Condition 1 (raw text) and condition 6 (block) tag names — CommonMark 0.31.
1045
+ "script",
1046
+ "pre",
1047
+ "style",
1048
+ "textarea",
1049
+ ...HTML_BLOCK_NAMES.replace("h[1-6]", "h1|h2|h3|h4|h5|h6").split("|")
1050
+ ]);
1051
+ function isHtmlBlockTagName(name) {
1052
+ return HTML_BLOCK_NAME_SET.has(name.toLowerCase());
1053
+ }
1054
+ function startsHtmlBlock(trimmed) {
1055
+ if (!trimmed.startsWith("<")) return false;
1056
+ return HTML_RAW.test(trimmed) || HTML_COMMENT_ETC.test(trimmed) || HTML_BLOCK_TAG.test(trimmed) || HTML_COMPLETE_TAG.test(trimmed);
1057
+ }
1058
+ function lineIndent(line) {
1059
+ let column = 0;
1060
+ for (const ch of line) {
1061
+ if (ch === " ") column += 1;
1062
+ else if (ch === " ") column += 4 - column % 4;
1063
+ else break;
1064
+ }
1065
+ return column;
1066
+ }
1067
+ var LIST_MARKER = /^([ \t]*)([-+*]|\d{1,9}[.)])([ \t]+|$)/;
1068
+ function markerContentColumn(marker) {
1069
+ const markerEnd = lineIndent(marker[1] ?? "") + (marker[2] ?? "").length;
1070
+ const gap = marker[3] ? lineIndent(" ".repeat(markerEnd) + marker[3]) - markerEnd : 1;
1071
+ return markerEnd + (gap >= 1 && gap <= 4 ? gap : 1);
1072
+ }
1073
+ function tableContainerIndent(lines, start) {
1074
+ return tableContainerIndentOf(lines, start, false);
1075
+ }
1076
+ function tableContainerIndentOf(lines, start, ownItem) {
1077
+ const own = ownItem ? LIST_MARKER.exec(lines[start] ?? "") : null;
1078
+ if (own) return markerContentColumn(own);
1079
+ const header = lineIndent(lines[start] ?? "");
1080
+ if (header === 0) return 0;
1081
+ for (let k = start - 1; k >= 0; k -= 1) {
1082
+ const line = lines[k] ?? "";
1083
+ if (!line.trim()) continue;
1084
+ const indent = lineIndent(line);
1085
+ const marker = LIST_MARKER.exec(line);
1086
+ if (marker && indent < header) {
1087
+ const content = markerContentColumn(marker);
1088
+ if (content <= header) return content;
1089
+ continue;
1090
+ }
1091
+ if (indent === 0) return 0;
1092
+ }
1093
+ return 0;
1094
+ }
1095
+ var DELIMITER_CELL = /^:?-+:?$/;
1096
+ function isGfmDelimiterRow(line) {
1097
+ const trimmed = line.trim();
1098
+ if (!trimmed.includes("|")) return false;
1099
+ const cells = rowCells(trimmed);
1100
+ return cells.length > 0 && cells.every((cell) => DELIMITER_CELL.test(cell));
1101
+ }
1102
+ function isPipeLedRow(line) {
1103
+ const trimmed = line.trim();
1104
+ return trimmed.startsWith("|") && trimmed.includes("|", 1);
1105
+ }
1106
+ function isTableDelimiter(line) {
1107
+ if (line === void 0 || !isGfmDelimiterRow(line)) return false;
1108
+ return !BLOCK_START.test(line.trim());
1109
+ }
1110
+ function startsPipelessTable(header, delimiter) {
1111
+ const head = header.trim();
1112
+ if (!head || isPipeLedRow(head) || !head.startsWith("|") && startsBlock(head)) return false;
1113
+ if (!isTableDelimiter(delimiter)) return false;
1114
+ return rowCells(head).length === rowCells(delimiter.trim()).length;
1115
+ }
1116
+ function continuesTable(line, containerIndent = 0) {
1117
+ const trimmed = line.trim();
1118
+ if (!trimmed) return false;
1119
+ if (lineIndent(line) - containerIndent >= 4) return false;
1120
+ return trimmed.startsWith("|") || !startsBlock(trimmed);
1121
+ }
1122
+ function opensTable(lines, index) {
1123
+ const line = lines[index] ?? "";
1124
+ if (!isPipeLedRow(line) && !startsPipelessTable(line, lines[index + 1])) return false;
1125
+ return !isLazyContinuation(lines, index) && !insideHtmlBlock(lines, index);
1126
+ }
1127
+ var QUOTE_LINE = /^ {0,3}>/;
1128
+ var THEMATIC_BREAK = /^(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/;
1129
+ var breaksParagraph = (trimmed) => /^#{1,6}(?:\s|$)/.test(trimmed) || THEMATIC_BREAK.test(trimmed) || opensStrictFence(trimmed) || startsHtmlBlock(trimmed);
1130
+ function htmlBlockEnd(trimmed) {
1131
+ if (HTML_RAW.test(trimmed)) return /<\/(?:script|pre|style|textarea)>/i;
1132
+ if (trimmed.startsWith("<!--")) return /-->/;
1133
+ if (trimmed.startsWith("<?")) return /\?>/;
1134
+ if (trimmed.startsWith("<![CDATA[")) return /\]\]>/;
1135
+ if (/^<![A-Za-z]/.test(trimmed)) return />/;
1136
+ if (HTML_BLOCK_TAG.test(trimmed)) return null;
1137
+ if (HTML_COMPLETE_TAG.test(trimmed)) return null;
1138
+ return void 0;
1139
+ }
1140
+ function insideHtmlBlock(lines, index) {
1141
+ let start = index;
1142
+ while (start > 0 && (lines[start - 1] ?? "").trim()) start -= 1;
1143
+ let open;
1144
+ let paragraph = false;
1145
+ for (let k = start; k < index; k += 1) {
1146
+ const line = lines[k] ?? "";
1147
+ if (open !== void 0) {
1148
+ if (open && open.test(line)) open = void 0;
1149
+ continue;
1150
+ }
1151
+ const trimmed = line.trim();
1152
+ const end = lineIndent(line) < 4 ? htmlBlockEnd(trimmed) : void 0;
1153
+ const type7 = end === null && !HTML_BLOCK_TAG.test(trimmed);
1154
+ const interrupts = end !== void 0 && !(paragraph && type7);
1155
+ if (!interrupts) {
1156
+ paragraph = true;
1157
+ continue;
1158
+ }
1159
+ paragraph = false;
1160
+ if (opensStrippedHtmlBlock(trimmed)) continue;
1161
+ open = end && end.test(trimmed.slice(2)) ? void 0 : end;
1162
+ }
1163
+ return open !== void 0;
1164
+ }
1165
+ function isLazyContinuation(lines, index) {
1166
+ const header = lines[index] ?? "";
1167
+ let first = -1;
1168
+ for (let k = index - 1; k >= 0; k -= 1) {
1169
+ const line = lines[k] ?? "";
1170
+ const trimmed = line.trim();
1171
+ if (!trimmed) break;
1172
+ if (breaksParagraph(trimmed)) break;
1173
+ const marker = LIST_MARKER.exec(line);
1174
+ if (marker) {
1175
+ const rest = line.slice(marker[0].length).trim();
1176
+ if (!rest || breaksParagraph(rest)) break;
1177
+ first = k;
1178
+ break;
1179
+ }
1180
+ first = k;
1181
+ if (QUOTE_LINE.test(line)) break;
1182
+ }
1183
+ if (first < 0) return false;
1184
+ const start = lines[first] ?? "";
1185
+ if (QUOTE_LINE.test(start)) return !QUOTE_LINE.test(header);
1186
+ return lineIndent(header) < tableContainerIndentOf(lines, first, true);
1187
+ }
1188
+ function tableStartsAt(lines, index) {
1189
+ const header = lines[index] ?? "";
1190
+ const delimiter = lines[index + 1];
1191
+ if (!opensTable(lines, index) || !isTableDelimiter(delimiter)) return false;
1192
+ if (rowCells(header).length !== rowCells(delimiter).length) return false;
1193
+ return lineIndent(header) - tableContainerIndent(lines, index) < 4;
1194
+ }
1195
+ function findTableStart(lines, from = 0) {
1196
+ for (let i = Math.max(0, from); i < lines.length; i += 1) if (opensTable(lines, i)) return i;
1197
+ return -1;
1198
+ }
1199
+ function findTableEnd(lines, start) {
1200
+ const container = tableContainerIndent(lines, start);
1201
+ let end = Math.min(lines.length, start + 2);
1202
+ while (end < lines.length && continuesTable(lines[end] ?? "", container)) end += 1;
1203
+ return end;
1204
+ }
1205
+
1002
1206
  // source/tokenize.ts
1003
1207
  var NOT_WHITESPACE = /\S/;
1004
1208
  var DIRECTIVE_OPEN = /^(:{2,})([A-Za-z][\w-]*)/;
@@ -1840,9 +2044,12 @@ var Tokenizer = class {
1840
2044
  });
1841
2045
  }
1842
2046
  }
2047
+ if (isHtmlBlockTagName(root)) return null;
1843
2048
  return this.island("xml_container", p, this.n, false, { tag: root });
1844
2049
  }
1845
2050
  if (isUnclosedGenericXmlOpening(seg)) {
2051
+ const name = /^\s*<([A-Za-z_][\w.:-]*)/.exec(seg)?.[1] ?? "";
2052
+ if (isHtmlBlockTagName(name)) return null;
1846
2053
  return this.island("xml_container", p, this.n, false, {});
1847
2054
  }
1848
2055
  return null;
@@ -2666,204 +2873,6 @@ function resolveReferenceLinks(fragment, defs) {
2666
2873
  return resolved.replace(new RegExp(`${PLACEHOLDER}(\\d+)${PLACEHOLDER}`, "g"), (_m, i) => spans[Number(i)] ?? "");
2667
2874
  }
2668
2875
 
2669
- // source/gfm-table.ts
2670
- function splitRowSegments(line) {
2671
- const segments = [];
2672
- let start = 0;
2673
- for (let i = 0; i < line.length; i += 1) {
2674
- const ch = line[i];
2675
- if (ch === "\\") {
2676
- i += 1;
2677
- continue;
2678
- }
2679
- if (ch === "|") {
2680
- segments.push(line.slice(start, i));
2681
- start = i + 1;
2682
- }
2683
- }
2684
- segments.push(line.slice(start));
2685
- return segments;
2686
- }
2687
- function rowCells(line) {
2688
- const cells = splitRowSegments(line).map((cell) => cell.trim());
2689
- if (cells.length > 1 && cells[0] === "") cells.shift();
2690
- if (cells.length > 1 && cells[cells.length - 1] === "") cells.pop();
2691
- else if (cells.length === 1 && cells[0] === "" && !line.includes("|")) cells.pop();
2692
- return cells;
2693
- }
2694
- function unescapeCellPipes(cell) {
2695
- return cell.replace(/\\\|/g, "|");
2696
- }
2697
- var BLOCK_START = /^(?:[-+*](?:\s|$)|\d{1,9}[.)](?:\s|$)|>|#{1,6}(?:\s|$)|(?:-\s*){3,}$|(?:\*\s*){3,}$|(?:_\s*){3,}$|\[\^[^\]\s]+\]:)/;
2698
- var startsBlock = (trimmed) => BLOCK_START.test(trimmed) || opensStrictFence(trimmed) || startsHtmlBlock(trimmed);
2699
- var HTML_RAW = /^<(?:script|pre|style|textarea)(?:[\s>]|$)/i;
2700
- var HTML_COMMENT_ETC = /^(?:<!--|<\?|<![A-Za-z]|<!\[CDATA\[)/;
2701
- var HTML_BLOCK_NAMES = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
2702
- var HTML_BLOCK_TAG = new RegExp(`^</?(?:${HTML_BLOCK_NAMES})(?:[\\s>]|/>|$)`, "i");
2703
- var ATTRIBUTE = `\\s+[A-Za-z_:][A-Za-z0-9_.:-]*(?:\\s*=\\s*(?:[^\\s"'=<>\`]+|'[^']*'|"[^"]*"))?`;
2704
- var HTML_COMPLETE_TAG = new RegExp(`^(?:<[A-Za-z][A-Za-z0-9-]*(?:${ATTRIBUTE})*\\s*/?>|</[A-Za-z][A-Za-z0-9-]*\\s*>)\\s*$`);
2705
- var HTML_BLOCK_NAME_SET = /* @__PURE__ */ new Set([
2706
- // Condition 1 (raw text) and condition 6 (block) tag names — CommonMark 0.31.
2707
- "script",
2708
- "pre",
2709
- "style",
2710
- "textarea",
2711
- ...HTML_BLOCK_NAMES.replace("h[1-6]", "h1|h2|h3|h4|h5|h6").split("|")
2712
- ]);
2713
- function isHtmlBlockTagName(name) {
2714
- return HTML_BLOCK_NAME_SET.has(name.toLowerCase());
2715
- }
2716
- function startsHtmlBlock(trimmed) {
2717
- if (!trimmed.startsWith("<")) return false;
2718
- return HTML_RAW.test(trimmed) || HTML_COMMENT_ETC.test(trimmed) || HTML_BLOCK_TAG.test(trimmed) || HTML_COMPLETE_TAG.test(trimmed);
2719
- }
2720
- function lineIndent(line) {
2721
- let column = 0;
2722
- for (const ch of line) {
2723
- if (ch === " ") column += 1;
2724
- else if (ch === " ") column += 4 - column % 4;
2725
- else break;
2726
- }
2727
- return column;
2728
- }
2729
- var LIST_MARKER = /^([ \t]*)([-+*]|\d{1,9}[.)])([ \t]+|$)/;
2730
- function markerContentColumn(marker) {
2731
- const markerEnd = lineIndent(marker[1] ?? "") + (marker[2] ?? "").length;
2732
- const gap = marker[3] ? lineIndent(" ".repeat(markerEnd) + marker[3]) - markerEnd : 1;
2733
- return markerEnd + (gap >= 1 && gap <= 4 ? gap : 1);
2734
- }
2735
- function tableContainerIndent(lines, start) {
2736
- return tableContainerIndentOf(lines, start, false);
2737
- }
2738
- function tableContainerIndentOf(lines, start, ownItem) {
2739
- const own = ownItem ? LIST_MARKER.exec(lines[start] ?? "") : null;
2740
- if (own) return markerContentColumn(own);
2741
- const header = lineIndent(lines[start] ?? "");
2742
- if (header === 0) return 0;
2743
- for (let k = start - 1; k >= 0; k -= 1) {
2744
- const line = lines[k] ?? "";
2745
- if (!line.trim()) continue;
2746
- const indent = lineIndent(line);
2747
- const marker = LIST_MARKER.exec(line);
2748
- if (marker && indent < header) {
2749
- const content = markerContentColumn(marker);
2750
- if (content <= header) return content;
2751
- continue;
2752
- }
2753
- if (indent === 0) return 0;
2754
- }
2755
- return 0;
2756
- }
2757
- var DELIMITER_CELL = /^:?-+:?$/;
2758
- function isGfmDelimiterRow(line) {
2759
- const trimmed = line.trim();
2760
- if (!trimmed.includes("|")) return false;
2761
- const cells = rowCells(trimmed);
2762
- return cells.length > 0 && cells.every((cell) => DELIMITER_CELL.test(cell));
2763
- }
2764
- function isPipeLedRow(line) {
2765
- const trimmed = line.trim();
2766
- return trimmed.startsWith("|") && trimmed.includes("|", 1);
2767
- }
2768
- function isTableDelimiter(line) {
2769
- if (line === void 0 || !isGfmDelimiterRow(line)) return false;
2770
- return !BLOCK_START.test(line.trim());
2771
- }
2772
- function startsPipelessTable(header, delimiter) {
2773
- const head = header.trim();
2774
- if (!head || isPipeLedRow(head) || !head.startsWith("|") && startsBlock(head)) return false;
2775
- if (!isTableDelimiter(delimiter)) return false;
2776
- return rowCells(head).length === rowCells(delimiter.trim()).length;
2777
- }
2778
- function continuesTable(line, containerIndent = 0) {
2779
- const trimmed = line.trim();
2780
- if (!trimmed) return false;
2781
- if (lineIndent(line) - containerIndent >= 4) return false;
2782
- return trimmed.startsWith("|") || !startsBlock(trimmed);
2783
- }
2784
- function opensTable(lines, index) {
2785
- const line = lines[index] ?? "";
2786
- if (!isPipeLedRow(line) && !startsPipelessTable(line, lines[index + 1])) return false;
2787
- return !isLazyContinuation(lines, index) && !insideHtmlBlock(lines, index);
2788
- }
2789
- var QUOTE_LINE = /^ {0,3}>/;
2790
- var THEMATIC_BREAK = /^(?:(?:-[ \t]*){3,}|(?:\*[ \t]*){3,}|(?:_[ \t]*){3,})$/;
2791
- var breaksParagraph = (trimmed) => /^#{1,6}(?:\s|$)/.test(trimmed) || THEMATIC_BREAK.test(trimmed) || opensStrictFence(trimmed) || startsHtmlBlock(trimmed);
2792
- function htmlBlockEnd(trimmed) {
2793
- if (HTML_RAW.test(trimmed)) return /<\/(?:script|pre|style|textarea)>/i;
2794
- if (trimmed.startsWith("<!--")) return /-->/;
2795
- if (trimmed.startsWith("<?")) return /\?>/;
2796
- if (trimmed.startsWith("<![CDATA[")) return /\]\]>/;
2797
- if (/^<![A-Za-z]/.test(trimmed)) return />/;
2798
- if (HTML_BLOCK_TAG.test(trimmed)) return null;
2799
- if (HTML_COMPLETE_TAG.test(trimmed)) return null;
2800
- return void 0;
2801
- }
2802
- function insideHtmlBlock(lines, index) {
2803
- let start = index;
2804
- while (start > 0 && (lines[start - 1] ?? "").trim()) start -= 1;
2805
- let open;
2806
- let paragraph = false;
2807
- for (let k = start; k < index; k += 1) {
2808
- const line = lines[k] ?? "";
2809
- if (open !== void 0) {
2810
- if (open && open.test(line)) open = void 0;
2811
- continue;
2812
- }
2813
- const trimmed = line.trim();
2814
- const end = lineIndent(line) < 4 ? htmlBlockEnd(trimmed) : void 0;
2815
- const type7 = end === null && !HTML_BLOCK_TAG.test(trimmed);
2816
- const interrupts = end !== void 0 && !(paragraph && type7);
2817
- if (!interrupts) {
2818
- paragraph = true;
2819
- continue;
2820
- }
2821
- paragraph = false;
2822
- open = end && end.test(trimmed.slice(2)) ? void 0 : end;
2823
- }
2824
- return open !== void 0;
2825
- }
2826
- function isLazyContinuation(lines, index) {
2827
- const header = lines[index] ?? "";
2828
- let first = -1;
2829
- for (let k = index - 1; k >= 0; k -= 1) {
2830
- const line = lines[k] ?? "";
2831
- const trimmed = line.trim();
2832
- if (!trimmed) break;
2833
- if (breaksParagraph(trimmed)) break;
2834
- const marker = LIST_MARKER.exec(line);
2835
- if (marker) {
2836
- const rest = line.slice(marker[0].length).trim();
2837
- if (!rest || breaksParagraph(rest)) break;
2838
- first = k;
2839
- break;
2840
- }
2841
- first = k;
2842
- if (QUOTE_LINE.test(line)) break;
2843
- }
2844
- if (first < 0) return false;
2845
- const start = lines[first] ?? "";
2846
- if (QUOTE_LINE.test(start)) return !QUOTE_LINE.test(header);
2847
- return lineIndent(header) < tableContainerIndentOf(lines, first, true);
2848
- }
2849
- function tableStartsAt(lines, index) {
2850
- const header = lines[index] ?? "";
2851
- const delimiter = lines[index + 1];
2852
- if (!opensTable(lines, index) || !isTableDelimiter(delimiter)) return false;
2853
- if (rowCells(header).length !== rowCells(delimiter).length) return false;
2854
- return lineIndent(header) - tableContainerIndent(lines, index) < 4;
2855
- }
2856
- function findTableStart(lines, from = 0) {
2857
- for (let i = Math.max(0, from); i < lines.length; i += 1) if (opensTable(lines, i)) return i;
2858
- return -1;
2859
- }
2860
- function findTableEnd(lines, start) {
2861
- const container = tableContainerIndent(lines, start);
2862
- let end = Math.min(lines.length, start + 2);
2863
- while (end < lines.length && continuesTable(lines[end] ?? "", container)) end += 1;
2864
- return end;
2865
- }
2866
-
2867
2876
  exports.AFTER_WINDOW = AFTER_WINDOW;
2868
2877
  exports.BacktickRuns = BacktickRuns;
2869
2878
  exports.CALLOUT_NAMES = CALLOUT_NAMES;
@@ -2908,6 +2917,7 @@ exports.mapInlineCodeSpans = mapInlineCodeSpans;
2908
2917
  exports.mapPosition = mapPosition;
2909
2918
  exports.mapRange = mapRange;
2910
2919
  exports.normalizeLinkLabel = normalizeLinkLabel;
2920
+ exports.opensStrippedHtmlBlock = opensStrippedHtmlBlock;
2911
2921
  exports.opensTable = opensTable;
2912
2922
  exports.pairDisplayMath = pairDisplayMath;
2913
2923
  exports.parseFenceOpener = parseFenceOpener;