mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-20 07:05:44 +01:00
Answer product-owner round 1: CommonMark is valid input to commonMarkToAdf, and a claimed shape that does not complete is an error result
This commit is contained in:
@@ -230,13 +230,15 @@ Serves Goals 1, 4 and 5.
|
|||||||
- Markdown this library reads, and markdown it writes, means what the CommonMark spec says; from
|
- Markdown this library reads, and markdown it writes, means what the CommonMark spec says; from
|
||||||
`0.3.0`, well-formed HTML means what the HTML standard says, read or written. The bullets below
|
`0.3.0`, well-formed HTML means what the HTML standard says, read or written. The bullets below
|
||||||
name every exception.
|
name every exception.
|
||||||
- CommonMark is valid input to every reader, apart from the raw HTML `unmappable-html` names and
|
- CommonMark is valid input to `commonMarkToAdf`, apart from the raw HTML `unmappable-html` names
|
||||||
one gap: a CommonMark image fits only as its own title-less paragraph. Mid-text and titled images
|
and one gap every reader shares: a CommonMark image fits only as its own title-less paragraph.
|
||||||
are error results, save an image inside another's description, which flattens into the alt text.
|
Mid-text and titled images are error results, save an image inside another's description, which
|
||||||
- `commonMarkToAdf` claims nothing else. `losslessMarkdownToAdf` claims four shapes: literal text
|
flattens into the alt text.
|
||||||
matching directive, pipe-table or strikethrough syntax, and a code fence whose info string opens
|
- The other readers claim shapes CommonMark reads as text. `losslessMarkdownToAdf` claims four:
|
||||||
`adf:`. Each can be kept literal (`spec/flavour.md`). `portableMarkdownToAdf` claims what
|
literal text matching directive, pipe-table or strikethrough syntax, and a code fence whose info
|
||||||
[Portable markdown](#portable-markdown) lists.
|
string opens `adf:`. `portableMarkdownToAdf` claims what [Portable markdown](#portable-markdown)
|
||||||
|
lists. A claimed shape that does not complete, such as a pipe row without a delimiter row, is an
|
||||||
|
error result; each can be kept literal (`spec/flavour.md`).
|
||||||
- A document any reader built, written back with `adfToLosslessMarkdown`, takes the library's
|
- A document any reader built, written back with `adfToLosslessMarkdown`, takes the library's
|
||||||
canonical spelling, which round-trips byte-identically.
|
canonical spelling, which round-trips byte-identically.
|
||||||
- Four CommonMark spellings parse without an error and build a document the reference
|
- Four CommonMark spellings parse without an error and build a document the reference
|
||||||
|
|||||||
Reference in New Issue
Block a user