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

Answer architecture round 1: 2 🔴, 4 🟡; refuse a link around only nodes that take none, mark the change breaking, file code-text marks

This commit is contained in:
2026-10-14 13:37:50 +02:00
committed by Lillem4n
parent d31efaba16
commit 6842f386ae
12 changed files with 96 additions and 45 deletions
+3 -2
View File
@@ -463,6 +463,8 @@ Every call can raise these:
replace a line ending with a space, or, for either, write the node as `!adf:carry`;
- wraps a directive mark around nothing, or only around nodes that take no such mark, such as a
hard break or a mention;
- writes a link around nodes none of which takes a link, more than hard breaks alone, such as
`[!adf:status[Done]{color=green}](/u)`: write the link around text beside them;
- writes as a directive a node or mark the lossless flavour spells as CommonMark;
- puts `!adf:textBreak{}` where it parts nothing, or `!adf:doc` anywhere but as the whole
document.
@@ -505,8 +507,7 @@ Serves [Goals](#goals) 1, 4 and 5.
- These CommonMark spellings parse without an error but build a document the reference
implementation renders differently, because ADF holds no node for what the reference renders:
- An empty link text reads as its destination, `[](/url)` as `/url` linked to `/url`, and `[]()`
as nothing. A link text holding no node that takes a link, such as a hard break or a mention,
reads the same, followed by those nodes.
as nothing. A link text holding only hard breaks reads the same, followed by its hard breaks.
- An image reads as an image only alone in its paragraph. Anywhere else — beside other text, in
a heading or a table cell, or in the paragraph a task marker opens — it reads as its
alt text linked to its URL: `See ![the moon](moon.png).` reads as