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

Respell the wiki writer's backslashes and inline carries as Jira reads them

This commit is contained in:
2026-11-17 02:58:01 +01:00
committed by Lillem4n
parent 6776a3c1d3
commit f36c0378fe
8 changed files with 120 additions and 57 deletions
+11 -1
View File
@@ -1453,7 +1453,7 @@ alt text.
Wiki markup has no spelling for some nodes and marks, a layout among them. The lossless wiki
writer wraps each such node's ADF JSON in Jira's own `{adf}` macro: `{adf:display=block}` for a
block node, `{adf:display=inline}` for an inline node or a marked run. The round-trip holds, and
block node, `{adf:display=inline}` for an inline node or each node of a marked run. The round-trip holds, and
Jira still renders the document. The lossy wiki writer ships beside it for consumers who want wiki
markup alone: it drops the form of what wiki markup cannot spell and keeps its content.
@@ -1507,6 +1507,16 @@ deep-equal and Jira's reading doesn't: `[~name]` reads as a `mention` with `id`
has no `language`, an unknown `{code:<language>}` reads `java`, a `bgColor` outside the five reads as
the nearest-looking panel type, not `info`, and a backslash before `:` stays text.
Checked again 2026-11-17 for the lossless writer's backslashes and inline carries. Jira drops the
backslash before `(`, `)`, `?`, `!`, `#`, `[`, `]`, `{`, `}`, `*`, `+`, `-`, `^`, `_` and `~`, and
keeps it as text before `:`, `;`, `.`, `,`, a letter, a digit and another backslash. So a backslash
before a smiley's `(`, or its closing `)`, stops it (`:\)` reads as the text `:)`), while `:D`, `:P`,
a `:` or `;` ending a node inside a line, and the `h` of `h1.` and the `b` of `bq.` at a line's start
ride the carry. An escaped `|` still ends a table cell, so a text holding `|` rides the carry there;
`|`, `\\`, `\"` and `\n` inside a carry's JSON survive in a cell and in a paragraph. A
`{adf:display=inline}` holding an array shows "Invalid ADF Macro", where one holding a node renders
it, so a run of nodes is one macro per node.
## A plain wiki spelling stands for the attributes Jira's editor writes, and any other attribute rides the carry
2026-11-16, the implementer of the wiki spec; the maintainer confirmed on 2026-11-17 that `localId` and a
+17
View File
@@ -1258,3 +1258,20 @@ Read most (opens and searches):
- `AGENTS.md` 3
- `todo.md` 2
- `src/index.ts` 1
## Reading cost, chunk 1fb1b988e9fa, finished 2026-11-17T01:46:15Z
266246 new input tokens before the first commit.
Read most (opens and searches):
- `spec/wiki.md` 8
- `src/adf/document.ts` 7
- `src/wiki/emit/inline-line.ts` 5
- `ci.sh` 4
- `docs/decisions.md` 4
- `src/adf/carried-json.ts` 4
- `src/html/emit/adf-to-html.test.ts` 4
- `README.md` 3
- `package.json` 3
- `src/wiki/emit/text-escaping.ts` 3