@ai-matrx/content-ir 0.19.3 → 0.19.5

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.d.cts CHANGED
@@ -622,7 +622,8 @@ declare function pairDisplayMath(text: string): Map<number, number>;
622
622
  * - A table starts at a header holding an unescaped pipe whose NEXT line is a
623
623
  * delimiter row (`--- | :-:`, edge pipes optional); a header without a leading
624
624
  * pipe must match the delimiter row's width. It runs to a blank line or a
625
- * line that starts another block (`- x`, `> y`, `# z`, `1.`, a fence, a rule).
625
+ * line that starts another block (`- x`, `> y`, `# z`, `1.`, a fence, a rule);
626
+ * every other line is a row, with or without a pipe (spec example 202).
626
627
  *
627
628
  * Pure TS, no dependencies.
628
629
  */
@@ -638,7 +639,12 @@ declare function isGfmDelimiterRow(line: string): boolean;
638
639
  declare function isPipeLedRow(line: string): boolean;
639
640
  /** True when `header` + `delimiter` open a table whose header has NO leading pipe. */
640
641
  declare function startsPipelessTable(header: string, delimiter: string | undefined): boolean;
641
- /** A line that continues an open table: a pipe-led row, or a pipe-less line with an unescaped pipe that starts no block. */
642
+ /**
643
+ * A line that continues an open table — GFM's rule (spec example 202): the table
644
+ * runs to the first blank line or the first line that starts another block; any
645
+ * other line is a row, even one without a pipe (`bar` → a one-cell row) and a
646
+ * lone `|` (an empty row). verify-RC-B4 R7-2.
647
+ */
642
648
  declare function continuesTable(line: string): boolean;
643
649
  /** Line `index` opens a table: a pipe-led row, or a pipe-less GFM header over its delimiter row. */
644
650
  declare function opensTable(lines: readonly string[], index: number): boolean;
package/dist/source.d.ts CHANGED
@@ -622,7 +622,8 @@ declare function pairDisplayMath(text: string): Map<number, number>;
622
622
  * - A table starts at a header holding an unescaped pipe whose NEXT line is a
623
623
  * delimiter row (`--- | :-:`, edge pipes optional); a header without a leading
624
624
  * pipe must match the delimiter row's width. It runs to a blank line or a
625
- * line that starts another block (`- x`, `> y`, `# z`, `1.`, a fence, a rule).
625
+ * line that starts another block (`- x`, `> y`, `# z`, `1.`, a fence, a rule);
626
+ * every other line is a row, with or without a pipe (spec example 202).
626
627
  *
627
628
  * Pure TS, no dependencies.
628
629
  */
@@ -638,7 +639,12 @@ declare function isGfmDelimiterRow(line: string): boolean;
638
639
  declare function isPipeLedRow(line: string): boolean;
639
640
  /** True when `header` + `delimiter` open a table whose header has NO leading pipe. */
640
641
  declare function startsPipelessTable(header: string, delimiter: string | undefined): boolean;
641
- /** A line that continues an open table: a pipe-led row, or a pipe-less line with an unescaped pipe that starts no block. */
642
+ /**
643
+ * A line that continues an open table — GFM's rule (spec example 202): the table
644
+ * runs to the first blank line or the first line that starts another block; any
645
+ * other line is a row, even one without a pipe (`bar` → a one-cell row) and a
646
+ * lone `|` (an empty row). verify-RC-B4 R7-2.
647
+ */
642
648
  declare function continuesTable(line: string): boolean;
643
649
  /** Line `index` opens a table: a pipe-led row, or a pipe-less GFM header over its delimiter row. */
644
650
  declare function opensTable(lines: readonly string[], index: number): boolean;
package/dist/source.js CHANGED
@@ -2634,8 +2634,7 @@ function startsPipelessTable(header, delimiter) {
2634
2634
  function continuesTable(line) {
2635
2635
  const trimmed = line.trim();
2636
2636
  if (!trimmed) return false;
2637
- if (trimmed.startsWith("|")) return trimmed.includes("|", 1);
2638
- return splitRowSegments(trimmed).length > 1 && !BLOCK_START.test(trimmed);
2637
+ return trimmed.startsWith("|") || !BLOCK_START.test(trimmed);
2639
2638
  }
2640
2639
  function opensTable(lines, index) {
2641
2640
  const line = lines[index] ?? "";