From db4599837c22d060d08cc1ffe634f87982ff72f6 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 4 Oct 2026 22:28:14 +0200 Subject: [PATCH] Answer prose round 1: the plain bullet ties the drop to what a reader sees, and the editor-normal comments read once --- README.md | 2 +- src/markdown/plain/editor-normal.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2f27dfa..7e250dd 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ read replaces mentions, attachments and macros with text. - A newline in text is a hard break and in an expand's title a space, edge whitespace outside a link or code span is trimmed, carriage returns and null characters are removed, and an empty paragraph drops. -- A text node's `content`, which Atlassian's schema forbids, drops. +- A text node's `content` drops: Atlassian's schema forbids it, so no rendered document shows it. - An ordered list numbered past `999999999`, or adjacent ordered lists whose numbering does not continue, is one bullet list keeping its numbers as text. - A task list beside a bullet or decision list, or holding a block other than a task, joins one diff --git a/src/markdown/plain/editor-normal.ts b/src/markdown/plain/editor-normal.ts index a5fc8ba..f9ad390 100644 --- a/src/markdown/plain/editor-normal.ts +++ b/src/markdown/plain/editor-normal.ts @@ -7,7 +7,7 @@ type JsonContainer = JsonValue[] | { [key: string]: JsonValue } type NodeHolder = { content?: AdfNode[] } -// The editor's rule is the reader's over the pair's editor-normal forms. +// The editor joins two text nodes where the reader would join their editor-normal forms. export function joinsWhenEditorNormal(previous: AdfNode, node: AdfNode): boolean { if (previous.type !== 'text' || node.type !== 'text') return false return joinsWhenRead(normalNode(previous), normalNode(node)) @@ -25,7 +25,7 @@ export function toEditorNormal(document: AdfDocument): AdfDocument { if (content.length === 0) continue entry.holder.content = content.map((source) => { const holder = normalNode(source) - // Atlassian's schema allows a text node no content, so the editor keeps none. + // Atlassian's schema forbids content on a text node, so the editor drops it. if (source.type !== 'text') pending.push({ holder, source }) return holder })