Rich text / foldkit-richtext-markdown
Limits
Smaller losses in a round trip. A code block's trailing blank lines, a heading's leading space, the words after a fence's language (
```ts title), and a line break inside a setext heading do not survive; a list item that is only a rule reads back as a rule; a row with fewer cells than the widest is padded. Each is reported by nothing yet.A table's header. GFM's header is the first row, so that row is printed as the header whether or not the document marks one; a row marked as the header anywhere else is reported, because GFM cannot place it. A cell's blocks are inlined with a space between them.
Inline atoms. The model has no inline image or break, so an
Imageis a block and prints as its own line — which a parser reads back as a paragraph holding an image.A link with no
hrefprints as its label, with anUnsupportedMarkdiagnostic.A mark on whitespace at a run's edge.
**bold **is not emphasis in CommonMark, so a marked run's leading and trailing whitespace is printed outside its delimiters: the text survives, and the space reads back unmarked.A bare URL in text. GFM links
https://…,www.…, and email addresses written as plain text, and no escape stops it, so such text reads back as a link.A hard line break has no shape inside a block, so it ends the paragraph and the rest starts a new one, with a diagnostic. Raw HTML and link definitions are reported and skipped: a document holds neither. Footnotes are too, unless
parseis givenfootnotes: true; a footnote label GFM cannot spell (one with a space) prints as text, reported.No profile yet. Custom syntax needs both directions at once, so it arrives with the first application that declares one.