mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-12 19:58:28 +01:00
Answer architecture round 5: name the alert and callout markers by their spelling, and item 56 its functions
This commit is contained in:
+6
-6
@@ -217,12 +217,12 @@ reads as that image, with the link marking its `media`. Inside any other link, t
|
||||
text the link marks, and the image's URL and title drop: the panel chose this by Goal 6, which
|
||||
outranks Goal 7.
|
||||
|
||||
In `portableMarkdownToAdf`, an alert's or unfolded callout's marker line stands apart from the lines
|
||||
after it, and so do those after a folded callout's title line, so an image alone on either reads as
|
||||
the image: a reader panel of the bot, the LLM pipeline and a support agent, 3 of 3 on 2026-10-09,
|
||||
expected the picture in every case, a ticked task included.
|
||||
A task item holds no image in Atlassian's schema, so the paragraph a task marker opens reads its
|
||||
image as linked alt text, the fallback two of the three named.
|
||||
In `portableMarkdownToAdf`, a `[!WORD]` marker with no `+` or `-` stands apart from the lines after
|
||||
it, and so does a `+` or `-` callout's title line, so an image alone on the marker line or after the
|
||||
title reads as the image: a reader panel of the bot, the LLM pipeline and a support agent, 3 of 3
|
||||
on 2026-10-09, expected the picture in every case, a ticked task included. A task item holds no
|
||||
image in Atlassian's schema, so the paragraph a task marker opens reads its image as linked alt
|
||||
text, the fallback two of the three named.
|
||||
|
||||
The same panel confirmed the other readings on 2026-10-09: a title as the caption, an image amid
|
||||
text as linked alt text, and an empty link text as its URL, each 3 of 3; `[]()` as nothing, 5 of 7.
|
||||
|
||||
+5
-4
@@ -323,10 +323,11 @@ directive form instead.
|
||||
`mediaInline` carries a media `collection` + `id`, never a URL, so anywhere else an image reads as
|
||||
its alt text linked to its destination, the link titled by the image's title: beside other
|
||||
content, in a heading, a table cell or an `!adf:paragraph`, and in the paragraph a portable task
|
||||
marker opens. An alert's or unfolded callout's marker line stands apart from the lines after it, and
|
||||
so do those after a folded callout's title line, so an image alone on either reads as the image. An empty alt text reads as the destination, as an empty link text
|
||||
does. Inside a link's text, the alt text is plain text the link marks, and the image's destination
|
||||
and title drop (`docs/decisions.md` §An image reads as an image only alone in its paragraph).
|
||||
marker opens. A `[!WORD]` marker with no `+` or `-` stands apart from the lines after it, and so
|
||||
does a `+` or `-` callout's title line, so an image alone on the marker line or after the title
|
||||
reads as the image. An empty alt text reads as the destination, as an empty link text does. Inside
|
||||
a link's text, the alt text is plain text the link marks, and the image's destination and title
|
||||
drop (`docs/decisions.md` §An image reads as an image only alone in its paragraph).
|
||||
|
||||
### Tables
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ function markerLine(text: string): { line: string; rest: string } {
|
||||
return { line: (hardBreak ? line.slice(0, -1) : line).replace(/^[ \t]+/, ''), rest: lineEnd === -1 ? '' : text.slice(lineEnd + 1) }
|
||||
}
|
||||
|
||||
// docs/decisions.md, An image reads as an image only alone in its paragraph: an alert's marker line stands apart from the lines after it.
|
||||
// docs/decisions.md, An image reads as an image only alone in its paragraph: a marker or title line stands apart from the lines after it.
|
||||
function paragraphsOf(position: SourcePosition, ...texts: string[]): Paragraph[] {
|
||||
return texts.filter((text) => text !== '').map((text) => ({ kind: 'paragraph', position, text }))
|
||||
}
|
||||
|
||||
@@ -333,8 +333,9 @@ functions write `pending`, `pieces`, `deactivatedBefore` and `openingSpellableLi
|
||||
`takeFallback` (`emit/inline-line.ts`), which writes the record the next `lineSegments` pass reads;
|
||||
`writeUnpaired`, `markPairings` and `markHighlights` (`inline-content.ts`), whose order changes the
|
||||
output; and `nestIn` (`portable/adf-to-portable-markdown.ts`), which pushes into its caller's array.
|
||||
Once `Scan`'s pieces have owners, the bracket resolution, `linkedAlt` through `altText` with
|
||||
`holdsLink`, can leave `inline-content.ts` (about 690 lines) for a module of its own.
|
||||
Once `Scan`'s pieces have owners, the bracket resolution — `linkedAlt` through `linkTo`,
|
||||
`holdsLink`, and `closeBracket` through `altText` — can leave `inline-content.ts` (about 690 lines)
|
||||
for a module of its own.
|
||||
|
||||
### 76. State the files the package does not ship once, so the build, the lint ceiling and the coverage exclusions cannot drift apart.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user