3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-21 07:32:58 +01:00

Refuse an inline card a link marks in every writer, before it writes

This commit is contained in:
2026-11-04 20:16:16 +01:00
committed by Lillem4n
parent 30f45b75d8
commit a27a4453c2
12 changed files with 97 additions and 52 deletions
+3 -3
View File
@@ -17,9 +17,9 @@
`localId` as `data-local-id`. Every other node is an element of class `adf-carry` holding the
node's JSON in `data-adf` and showing its content, links included. Every URL is written as the
ADF holds it, `javascript:` included: sanitize HTML from an author you do not trust before
showing it. `adfToHtml` refuses an inline card a link marks, in a block written as an element, as
`unsupported-node-shape`: Atlassian's schema gives a card no link mark, and HTML nests no link in
a link.
showing it. **Breaking:** `adfToHtml`, `adfToLosslessMarkdown` and `adfToPortableMarkdown` refuse an
inline card a link marks, wherever it stands, as `unsupported-node-shape` at the card's path, before
they write: Atlassian's schema gives a card no link mark.
- `htmlToAdf` reads `adfToHtml`'s HTML back to the document it came from, a carry element from its
`data-adf`. It reads that HTML as a browser's `innerHTML` writes it too (a raw `"` in text,
`&nbsp;`, a raw `<` or `>` in an attribute value) and as a form post sends it (`\r\n` for each