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

Fold unspellable-whitespace into unsupported-node-shape

This commit is contained in:
2026-10-14 00:02:58 +02:00
committed by Lillem4n
parent 3f6ed8fb3a
commit 06df26727a
8 changed files with 16 additions and 28 deletions
+7 -5
View File
@@ -87,11 +87,12 @@ Markdown the spelling table leaves alone, which `0.2.0` reads as a different doc
### Error codes
`unmappable-image`, `unspellable-character`, `unspellable-line-start` and `unspellable-link` leave
`ConvertErrorCode`, and `engine-limit` and `not-a-string` join it. A `switch` naming one of the four
stops compiling, and one naming every code needs the two new cases. A document `adfToMarkdown`
refused with one of the three `unspellable-` codes now converts in `adfToLosslessMarkdown`; markdown
the parser refused with one of the four now reads, or refuses with the code the table gives.
`unmappable-image`, `unspellable-character`, `unspellable-line-start`, `unspellable-link` and
`unspellable-whitespace` leave `ConvertErrorCode`, and `engine-limit` and `not-a-string` join it. A
`switch` naming one of the five stops compiling, and one naming every code needs the two new cases.
A document `adfToMarkdown` refused with one of the four `unspellable-` codes now converts in
`adfToLosslessMarkdown`; markdown the parser refused with one of the five now reads, or refuses with
the code the table gives.
| Input | `0.1.0` | `0.2.0` |
| --- | --- | --- |
@@ -105,6 +106,7 @@ the parser refused with one of the four now reads, or refuses with the code the
| a paragraph line opening with a code span of three or more backticks, on emit | `unspellable-line-start` | spells the code span |
| a block directive whose CommonMark spelling holds a carriage return, a null character or a code span opening a line, on parse | `unspellable-character`, `unspellable-line-start` | `unsupported-node-shape`; write the CommonMark spelling |
| an `emoji`, `mention` or `status` whose `text` holds a line ending or a null character, on emit | `unspellable-whitespace`, `unspellable-character` | rides the inline carry |
| an `emoji`, `mention` or `status` directive whose content slot spells a line ending (`
`, `
`, `!adf:text{text="\n"}`), on parse | `unspellable-whitespace` | `unsupported-node-shape`; write the node as `!adf:carry` |
| a text node holding no text, or holding `content`, on emit | `unsupported-node-shape` | rides the carry |
| a `codeBlock` holding other than plain text nodes, on emit | `unsupported-node-shape` | rides the block carry |
| a leaf node given a body (`media`) | `unsupported-node-shape` | `malformed-directive` |