mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-12 11:48:29 +01:00
Answer prose round 1: 1 🔴, 13 🟡 (1 misread); correct the migration recipe, tighten the specs and item 168's detail
This commit is contained in:
+4
-3
@@ -582,10 +582,11 @@ 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, a block or non-text inline
|
||||
node holding `text`, and a leaf block or non-text inline node holding `content` ride no carry:
|
||||
(`docs/decisions.md` §Unknown nodes ride the carry). An inline card a link marks, a known block holding
|
||||
`text`, a known non-text inline node holding `text` or non-empty `content`, and a known block that
|
||||
takes no content, such as `rule`, holding non-empty `content` don't ride the 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.
|
||||
reading a carry that holds one, since Atlassian's schema allows none of these.
|
||||
|
||||
```
|
||||
!adf:textColor[**Overdue**]{color="#ae2e24"}, H!adf:subsup[2]{type=sub}O, !adf:underline[signed].
|
||||
|
||||
+13
-11
@@ -20,7 +20,7 @@ Blocks are separated by a line feed, and a document holding any ends with one. A
|
||||
| `orderedList` | as `bulletList` with `<ol>`; `<ol start="3">` for an `order` of 3, a safe integer other than `-0`; no `start` where the list holds no `order` |
|
||||
| `paragraph` | `<p>…</p>` |
|
||||
| `rule` | `<hr>` |
|
||||
| `table` | `<table>`, a line feed, a `<thead>` where its first row holds cells that are all `tableHeader`, then a `<tbody>` for the other rows where there are any, a line feed, `</table>`. Each section is its tag, a line feed, its rows a line each, a line feed, its closing tag |
|
||||
| `table` | `<table>`, a line feed, its sections parted by a line feed, a line feed, `</table>`: a `<thead>` where its first row holds cells that are all `tableHeader`, and a `<tbody>` for the other rows where there are any. Each section is its tag, a line feed, its rows a line each, a line feed, its closing tag |
|
||||
| `tableCell`, `tableHeader` | `<td>`, `<th>`, each holding its blocks as a `listItem` does: `<td>Bolt M8</td>`; attributes `colspan`, `rowspan`, `style="background-color:#fffae6"` for `background`, and `data-colwidth="120,80"` for `colwidth`, first and in that order |
|
||||
| `tableRow` | `<tr>`, its cells with no line feed between them, `</tr>` |
|
||||
|
||||
@@ -28,19 +28,20 @@ A container holding no `content` key is its element holding nothing: `<blockquot
|
||||
`<ul></ul>`, `<li></li>`, `<table></table>`, `<tr></tr>`, `<td></td>`; so is a paragraph or heading,
|
||||
`<p></p>`.
|
||||
|
||||
A table and each of its rows count one nesting level; a cell counts none, as a list item does.
|
||||
|
||||
```html
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>Part</th><th>Stock</th></tr>
|
||||
<tr><th>Part</th><th>Stock</th><th>Bin</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Bolt M8</td><td colspan="2" rowspan="2" style="background-color:#fffae6" data-colwidth="120,80">Low</td></tr>
|
||||
<tr><td rowspan="2">Bolt M8</td><td colspan="2" style="background-color:#fffae6" data-colwidth="120,80">Low</td></tr>
|
||||
<tr><td>12</td><td>A4</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
```
|
||||
|
||||
A table and each of its rows count one nesting level; a cell doesn't count, nor does a list item.
|
||||
|
||||
On a paragraph, heading, quote, list, list item, table, row, cell, code block or rule, each attribute its type holds
|
||||
(`spec/flavour.md` §Block nodes) that the element does not write as `level`, `order`, `language`,
|
||||
`colspan`, `rowspan`, `background` or `colwidth` is a `data-*` attribute, named as HTML's `dataset` names it, `localId` as `data-local-id`, after the
|
||||
@@ -145,14 +146,15 @@ later release writes it as its own element.
|
||||
attribute its type does not hold: the whole list rides the carry;
|
||||
- a table holding a node that is no `tableRow`, a row holding a node that is no cell, or a table,
|
||||
row or cell holding a mark, an empty key or an attribute its type does not hold: the whole table
|
||||
rides the carry. So does a cell whose `colspan` or `rowspan` is no positive safe integer, whose
|
||||
`colwidth` is no list of numbers, or whose `background` holds anything but letters and digits
|
||||
after an optional `#`;
|
||||
rides the carry. So does a cell whose `colspan` or `rowspan` isn't a positive safe integer, whose
|
||||
`colwidth` isn't a list of numbers, or whose `background` isn't a string of one or more letters
|
||||
and digits, after an optional `#`;
|
||||
- a `listItem`, `tableRow` or cell outside its parent, an inline node in block position and a block
|
||||
node inline.
|
||||
- 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.
|
||||
- An inline card a link marks, a known block holding `text`, a known non-text inline node holding
|
||||
`text` or non-empty `content`, and a known block that takes no content, such as `rule`, holding
|
||||
non-empty `content` are refused as `unsupported-node-shape`, carried or not, by `adfToHtml` and by
|
||||
`htmlToAdf` reading a carry element, since Atlassian's schema allows none of these.
|
||||
- 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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user