3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-12 11:48:29 +01:00

Refuse the schema-forbidden shapes in the first step, carried or not

This commit is contained in:
2026-11-05 11:02:45 +01:00
committed by Lillem4n
parent 24247eff85
commit d55a249ef3
18 changed files with 132 additions and 47 deletions
+4 -3
View File
@@ -582,9 +582,10 @@ open or close where the run sits (`un**-real**istic`), or one CommonMark's match
the merged run's pairing to another delimiter — rides the inline carry whole. So does every node
holding `em`, `strike` or `strong` in a line still read back wrong after 32 tries. An opaque carry inside
a mark spelling is a named error in input: the carry restores its node exactly, marks included
(`docs/decisions.md` §Unknown nodes ride the carry). An inline card a link marks rides no carry:
`adfToLosslessMarkdown` refuses it as `unsupported-node-shape`, and so does `losslessMarkdownToAdf`
reading a carry that holds one, since Atlassian's schema gives a card no link mark.
(`docs/decisions.md` §Unknown nodes ride the carry). An inline card a link marks, a block or non-text inline
node holding `text`, and a leaf block or non-text inline node holding `content` ride no carry:
`adfToLosslessMarkdown` refuses each as `unsupported-node-shape`, and so does `losslessMarkdownToAdf`
reading a carry that holds one, since Atlassian's schema gives no node those.
```
!adf:textColor[**Overdue**]{color="#ae2e24"}, H!adf:subsup[2]{type=sub}O, !adf:underline[signed].
+4 -3
View File
@@ -123,12 +123,13 @@ later release writes it as its own element.
alone whose `url` is missing or holds only whitespace;
- a code block holding more than one text node, a marked one, or a language holding ASCII
whitespace;
- a rule or hard break holding `content`, and a hard break holding an attribute;
- a hard break holding an attribute;
- a list holding a node that is no `listItem`, or an item holding a mark, text, an empty key or
an attribute its type does not hold: the whole list rides the carry;
- a `listItem` outside a list, an inline node in block position and a block node inline.
- An inline card a link marks is refused as `unsupported-node-shape`, carried or not, by `adfToHtml`
and by `htmlToAdf` reading a carry element: Atlassian's schema gives a card no link mark.
- An inline card a link marks, a block or non-text inline node holding `text`, and a leaf block or
non-text inline node holding `content` are refused as `unsupported-node-shape`, carried or not, by
`adfToHtml` and by `htmlToAdf` reading a carry element: Atlassian's schema gives no node those.
- A block carry's JSON nests at most 500 levels less the depth it stands at, an inline carry's at
most 500, as in markdown.