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

Answer prose round 1: 0 🔴, 7 🟡 (0 misread); the decision, spec, changelog and items 34, 91, 153 and 155 are rewritten, and readBack's, parseInlineContent's, readLineBack's, guardLinkDefinition's and InlineReading's comments say what the code cannot

This commit is contained in:
2026-10-28 17:36:28 +01:00
committed by Lillem4n
parent ded38b95be
commit 2b6d5f2def
4 changed files with 21 additions and 22 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ In `docs/decisions.md`:
- Cost fixes are measured, never timed
- Only the hard break holds a raw newline
- Emphasis follows CommonMark's matching
- A line that opens a code span or a link at text escapes every text backtick or `[` in it
- Where a text backtick or `[` opens a code span, a link or an image, every text backtick or `[` in its line escapes
- Readable spellings take the `try` prefix
- The attribute vocabulary is ADF's
- The source parts by ADF and format
+4 -8
View File
@@ -942,18 +942,14 @@ Emphasis is spelled against CommonMark's matching, never flanking alone: a delim
escapes wherever CommonMark could open or close with it, leaving the emitter's own delimiters the
only ones in play, and a pair that matching hands to another delimiter rides the carry instead.
## A line that opens a code span or a link at text escapes every text backtick or `[` in it
## Where a text backtick or `[` opens a code span, a link or an image, every text backtick or `[` in its line escapes
2026-10-28, a writer panel, 3 of 3. Goals 1, 6 and 9. Valid while the writers find a construct
by reading the escaped line back.
A writer reads each escaped line back. Where a code span opens at a text backtick, every text
backtick in the line escapes, and where a link or an image opens at a text `[`, every text `[`
does: `[a](b) [c]` is written `\[a](b) \[c]`. A text `[` or backtick that opens nothing stays
bare. A line the reader refuses without showing what opened at text escapes every text backtick
and `[`. Escaping only up to the last construct text opens read as arbitrary to the panel, and
escaping each opener in turn costs a read per opener, against goal 9. The grammar:
`spec/flavour.md` §Canonical form.
The panel rejected escaping only the text `[`s before the last link a text `[` opens, which
writes `[a](b) [c]` as `\[a](b) [c]`, as arbitrary. Escaping each opener in turn costs a read per
opener, against goal 9. The rule: `spec/flavour.md` §Canonical form.
## Readable spellings take the `try` prefix
+3 -2
View File
@@ -57,8 +57,9 @@ normalizes to it through the round-trip.
A backtick run escapes whole. The escaped line is then read back. Where it opens a code span at a
text backtick, every text backtick in the line escapes: CommonMark reads no escape inside a code
span, so a backtick string beside an escape can still close one. Where it opens a link or an
image at a text `[`, every text `[` in the line escapes. A line the reader refuses without
showing what opened at text escapes every text backtick and `[`.
image at a text `[`, every text `[` in the line escapes. Where the reader refuses the line and
records no code span, link or image opening at a text backtick or `[`, every text backtick and
`[` in the line escapes.
Where a paragraph opens with what reads as a link reference definition, which resolves before
any inline construct binds (a `]` inside a code span or `{attrs}` counts), an opening text `[`
escapes and an opening link takes the directive link (Marks).
+13 -11
View File
@@ -142,7 +142,7 @@ documentation, saying so in its row.
### 91. Spell an emphasis once across the code spans, an emphasis or link once across the hard breaks, dates, emoji, inline cards, mentions and statuses between two nodes it marks, and an emphasis across inline media, in both writers.
The writers read each line back, so a joined spelling can be kept only where it reads back. No
Reading each line back lets the writers try a joined spelling and keep it where it reads back. No
reader marks a hard break, so `*One\` then `Two*` writes back as `_One_\` then `_Two_`, and a link
typed across a line as two links. No reader gives those other nodes a mark Atlassian's schema
withholds from them, and none gives code text a mark but a link. So `**Ping !adf:mention[@A]{id=x}
@@ -192,10 +192,11 @@ interim sentence.
### 153. Decide whether `src/markdown/` root may import `emit/`, `parse/` or `portable/`, and hold the answer in `.oxlintrc.json` and §The source parts by ADF and format.
The writers read each escaped line back through `src/markdown/inline-content.ts`'s scan. A writer
question put back on that scan's path, such as the opening-link consult it takes as an argument
today, would close the cycle writer → reader → writer and recurse without bound on a paragraph
opening with a spellable `!adf:link` (§Nothing recurses unbounded). No `no-restricted-imports`
override covers `src/markdown/*.ts`; adding one, with its `ci.sh` probe, extends the decision.
question put back on that scan's path, such as the opening-link consult `parseInlineContent` takes
as an argument today, would close the cycle writer → reader → writer and recurse without bound on
a paragraph opening with a spellable `!adf:link` (§Nothing recurses unbounded). The override for
`src/markdown/**` bans only `html/`; banning `emit/`, `parse/` and `portable/` for the root's own
files, with its `ci.sh` probe, extends the decision.
### 128. Pin the portable flavour's block reading and writing with tests: callout titles past one line, a link beside other marks in a title, the nesting limit of callouts and task lists, refusals inside tasks and their paths, and empty or non-paragraph tasks.
@@ -222,9 +223,10 @@ read.
### 155. Have `closeBracket` return the link, image or literal bracket it builds, and apply it to the scan in one caller.
A comprehension seat found `src/markdown/inline-content.ts` `closeBracket` / `truncatePieces`
hard: `closeBracket`, `unopened`, `literalClose` and `popBracket` each write `scan.pieces`, the
link openers or the reading. Make that place easier to read.
A comprehension seat found `src/markdown/inline-content.ts` `closeBracket` hard: it writes
`scan.pieces`, the link openers and the reading, and calls `unopened`, `literalClose` and
`popBracket`, which write `scan.pieces`, `scan.pending` and the link openers. Make that place
easier to read.
### 45. Replace `isAdfDocument` with a reader returning `Result<AdfDocument>`.
@@ -468,9 +470,9 @@ bash footguns (`&&` chaining under `||`, `tee /dev/stderr`) the port removes.
### 34. Read emphasis flanking by the whole character beside an astral symbol.
Check whether `delimiterRunToken` (`inline-tokens.ts`) and `resolveEmphasis` (`line-escaping.ts`)
read one UTF-16 unit beside an astral symbol. A lone surrogate is neither
punctuation nor symbol, but CommonMark reads `😀` as punctuation. Where they do, read the code
point, with a fixture per direction.
read one UTF-16 unit beside an astral symbol. A lone surrogate is neither punctuation nor symbol,
but CommonMark reads `😀` as punctuation. Where they do, read the code point, with a fixture per
direction.
### 74. Keep the release path publishing after npm retires bypass-2FA tokens.