mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-12 11:48:29 +01:00
Read a GFM pipe table's short rows, rows without a pipe and one column in portableMarkdownToAdf
This commit is contained in:
+8
-6
@@ -365,13 +365,15 @@ 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, 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
|
||||
(optional in input). Named errors: a delimiter row whose cell count differs from the header's,
|
||||
a body row holding more cells than the header, and, in `losslessMarkdownToAdf`, a body row
|
||||
holding fewer cells and 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.
|
||||
`portableMarkdownToAdf` reads GFM's table: any row may drop its leading `|`, a header over a
|
||||
delimiter row of one cell reads as a one-column table (`a |` over `--- |`), a body row continues
|
||||
the table until a blank line or a line opening another block, a body row holding fewer cells is
|
||||
padded with empty cells, a line holding no `|` is a body row of one cell, and an alignment colon is
|
||||
read and its alignment dropped.
|
||||
|
||||
The directive form nests cells as containers of block content inside `tableRow` containers:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user