@ai-matrx/content-ir 0.19.9 → 0.19.11
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/CHANGELOG.md +13 -0
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/source.cjs +11 -4
- package/dist/source.cjs.map +1 -1
- package/dist/source.d.cts +10 -4
- package/dist/source.d.ts +10 -4
- package/dist/source.js +11 -4
- package/dist/source.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.19.11
|
|
4
|
+
|
|
5
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
6
|
+
`git diff npm/content-ir-core/v0.19.10..npm/content-ir-core/v0.19.11 -- apps/shared/content-ir-core`).
|
|
7
|
+
No source changes intended and no consumer action required.
|
|
8
|
+
|
|
9
|
+
## 0.19.10
|
|
10
|
+
|
|
11
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
12
|
+
`git diff npm/content-ir-core/v0.19.9..npm/content-ir-core/v0.19.10 -- apps/shared/content-ir-core`).
|
|
13
|
+
No source changes intended and no consumer action required.
|
|
14
|
+
|
|
3
15
|
## 0.19.9
|
|
4
16
|
### Unreleased
|
|
5
17
|
|
|
6
18
|
- `/source` **A table ends where GFM ends it (verify-RC-B4 round 9):** `continuesTable` / `findTableEnd` end a table at an HTML block start (all seven CommonMark 4.6 conditions — `<script`/`<pre`/`<style`/`<textarea`, `<!--`, `<?`, `<!X`, `<![CDATA[`, a block tag name, or any other complete tag alone on its line such as `</artifact>`) and at indented code: a line 4+ columns past the table's container. New `startsHtmlBlock`, `lineIndent`, `tableContainerIndent` (the content column of the list item a table sits in); `continuesTable(line, containerIndent = 0)`. A lone `|` is a row (one empty cell) — `rowCells("|")` is `[""]`, no longer `[]`. Since 0.19.4 an HTML line or an indented line after a table was read as a table row. Shared vectors gain `tableEnds` (30 cases, each judged against remark-gfm in matrx-frontend); the Python twin moved with them.
|
|
7
19
|
- `/source` **A table never opens on a lazy continuation line (verify-RC-B4 round 9):** `opensTable` / `tableStartsAt` / `findTableStart` refuse a header that lazily continues a list item's or a block quote's paragraph (no blank line above, not indented to the item's content column, or missing the quote's `>`) — GFM reads it as paragraph text (`- item` then `| a | b |` is no table). Vectors gain `tableStarts` (15 cases, judged against remark-gfm).
|
|
20
|
+
- `/source` **A table opens exactly where GFM opens one (verify-RC-B4 round 9):** `tableStartsAt` requires the delimiter row to match the header's width for pipe-led headers too (`| a | b |` over `|---|` is no table), refuses a "delimiter" that is a list item (`- | -`), and refuses a header indented 4+ columns past its container (indented code). `startsPipelessTable` accepts a header with one pipe (`| a`) or none (`Notes` over `|---|` is a one-column table), as GFM does. Vectors gain 8 opening cases.
|
|
8
21
|
|
|
9
22
|
## 0.19.8
|
|
10
23
|
|
package/dist/index.cjs
CHANGED
|
@@ -7753,11 +7753,14 @@ function isPipeLedRow(line) {
|
|
|
7753
7753
|
const trimmed = line.trim();
|
|
7754
7754
|
return trimmed.startsWith("|") && trimmed.includes("|", 1);
|
|
7755
7755
|
}
|
|
7756
|
+
function isTableDelimiter(line) {
|
|
7757
|
+
if (line === void 0 || !isGfmDelimiterRow(line)) return false;
|
|
7758
|
+
return !BLOCK_START.test(line.trim());
|
|
7759
|
+
}
|
|
7756
7760
|
function startsPipelessTable(header, delimiter) {
|
|
7757
7761
|
const head = header.trim();
|
|
7758
|
-
if (!head || head.startsWith("|")
|
|
7759
|
-
if (
|
|
7760
|
-
if (delimiter === void 0 || !isGfmDelimiterRow(delimiter)) return false;
|
|
7762
|
+
if (!head || isPipeLedRow(head) || !head.startsWith("|") && startsBlock(head)) return false;
|
|
7763
|
+
if (!isTableDelimiter(delimiter)) return false;
|
|
7761
7764
|
return rowCells(head).length === rowCells(delimiter.trim()).length;
|
|
7762
7765
|
}
|
|
7763
7766
|
function continuesTable(line, containerIndent = 0) {
|
|
@@ -7798,7 +7801,11 @@ function isLazyContinuation(lines, index) {
|
|
|
7798
7801
|
return lineIndent(header) < tableContainerIndentOf(lines, first, true);
|
|
7799
7802
|
}
|
|
7800
7803
|
function tableStartsAt(lines, index) {
|
|
7801
|
-
|
|
7804
|
+
const header = lines[index] ?? "";
|
|
7805
|
+
const delimiter = lines[index + 1];
|
|
7806
|
+
if (!opensTable(lines, index) || !isTableDelimiter(delimiter)) return false;
|
|
7807
|
+
if (rowCells(header).length !== rowCells(delimiter).length) return false;
|
|
7808
|
+
return lineIndent(header) - tableContainerIndent(lines, index) < 4;
|
|
7802
7809
|
}
|
|
7803
7810
|
function findTableStart(lines, from = 0) {
|
|
7804
7811
|
for (let i = Math.max(0, from); i < lines.length; i += 1) if (opensTable(lines, i)) return i;
|