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

Answer product-owner round 1: 0 🔴, 2 🟡; file the code-span rewrite under item 91, say what writing back and keeping a mark cost

This commit is contained in:
2026-10-14 20:53:19 +02:00
parent c24702a398
commit 01f1773677
2 changed files with 21 additions and 15 deletions
+9 -4
View File
@@ -2,18 +2,23 @@
## From `0.2.0` to `0.3.0`
In `losslessMarkdownToAdf`, a mark spelling skips a node Atlassian's schema withholds the mark from:
A mark spelling skips a node Atlassian's schema withholds the mark from, in `losslessMarkdownToAdf`, and
skips code text in every reader:
| Input | `0.2.0` | `0.3.0` |
| --- | --- | --- |
| a `date`, `emoji`, `inlineCard`, `mention`, `status` or `mediaInline` inside a mark's spelling (`**!adf:mention[@A]{id=x}**`) | the node holds the mark | the node holds only marks its type takes; text beside it keeps the mark |
| a link or directive mark around only nodes that cannot take it, a code span included, hard breaks under a link aside (`[!adf:status[Done]{color=green}](/u)`) | the nodes hold the mark | `unsupported-node-shape`; write the mark around text beside them |
| a link around only nodes that cannot take it, hard breaks aside, or a directive mark around only such nodes or code spans (`[!adf:status[Done]{color=green}](/u)`) | the nodes hold the mark | `unsupported-node-shape`; write the mark around text beside them |
| a code span inside any mark's spelling but a link's (``**`npm ci`**``), in every reader | the code text holds the mark | the code text holds only `code` and the link |
`0.2.0` wrote these spellings for a node holding such a mark; `0.3.0` writes the node as
`!adf:carry{json="…"}`. `0.3.0` reads markdown stored from such a document without the mark, or
refuses it where the mark wrapped such nodes alone. To keep the mark, read the markdown with `0.2.0`
and write it with `0.3.0`, installed side by side:
refuses it where the mark wrapped such nodes alone. Written back, a space beside such a node inside
the mark's spelling becomes `!adf:text{text=" "}`: ``**Run `npm ci` first**`` writes back as
``**Run!adf:text{text=" "}**`npm ci`**!adf:text{text=" "}first**``. A kept mark is one Atlassian's
schema withholds, so a site may refuse the document: keep one only in markdown written from ADF that
held it. To keep the mark, read the markdown with `0.2.0` and write it with `0.3.0`, installed side
by side:
```sh
npm install @larvit/adf-codec@0.3.0 adf-codec-0.2@npm:@larvit/adf-codec@0.2.0