3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 15:15:44 +01:00

Answer prose round 1: 0 🔴, 7 🟡; the guarantee splits per reader, the spec's portable sentence follows the named errors, item 112 names rows holding no pipe

This commit is contained in:
2026-10-14 00:52:05 +02:00
committed by Lillem4n
parent 40afc48567
commit 5f1c64b371
7 changed files with 34 additions and 30 deletions
+10 -8
View File
@@ -346,18 +346,20 @@ Claiming at block level, symmetric with directives: a line opening with an unesc
claimed and must parse as part of a pipe table, else it is a named error — escape the pipe
(`\|`) to keep it literal text. The shape a missing leading pipe leaves is claimed too: a line
holding an unescaped `|`, followed inside one paragraph by a line whose cells are all `-` runs,
an alignment colon among them, and match it in count — GFM's table without the outer pipes — is
a named error rather than the prose it reads as. `portableMarkdownToAdf` reads that shape as a
table, its body rows with or without the leading `|` until a line holding none or opening another
block, and drops an alignment colon's alignment. A pipe table is a header row, a delimiter row whose cells are runs of
one or more `-` (canonical `---`), and body rows; rows follow code-fence indentation.
alignment colons allowed, and match it in count — GFM's table without the outer pipes — is a
named error rather than the prose it reads as. A pipe table is a header row, a delimiter row whose
cells are runs of one or more `-` (canonical `---`), and body rows; rows follow code-fence
indentation.
Cells split on unescaped `|` before inline parsing — `\|` stays in the cell text, and the
inline layer's ordinary CommonMark escaping yields the pipe; each cell is the inline content of
one paragraph, trimmed; canonical form pads cells with single spaces and ends rows with `|`
(optional in input). Named errors: a delimiter or body row whose cell count differs from the
header's, and, outside `portableMarkdownToAdf`, an alignment colon in the delimiter row — ADF holds
no column alignment. In a pipe cell a hard break is `!adf:hardBreak{}` and a literal `|` is `\|`;
a `|` inside a quoted attribute value is already `\u007c`, so the split never reaches it.
header's, and, in `losslessMarkdownToAdf`, an alignment colon in the delimiter row — ADF holds no
column alignment. In a pipe cell a hard break is `!adf:hardBreak{}` and a literal `|` is `\|`; a
`|` inside a quoted attribute value is already `\u007c`, so the split never reaches it.
`portableMarkdownToAdf` reads GFM's table: any row may drop its leading `|`, a body row continues
the table while it holds a `|` and opens no other block, and an alignment colon is read and its
alignment dropped.
The directive form nests cells as containers of block content inside `tableRow` containers: