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

Answer prose round 1: 0 🔴, 2 🟡 (0 misread); say a note keeps only its link and reword the note comments

This commit is contained in:
2026-11-09 09:21:15 +01:00
committed by Lillem4n
parent 2aa246898d
commit 896e67fdfd
4 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export function oneLine(text: string): string {
export type ShownNote = { link: LinkAttrs | undefined; name: string }
// The note standing in place of a node that shows no text of its own: `name` what it references, and `link` the node's link, which both writers keep around the note. `undefined` where the node references nothing.
// The note standing in place of a node that shows no text of its own: `name` is what the node references, `link` its own link, kept around the note. `undefined` where the node references nothing.
export function shownNote(node: AdfNode): ShownNote | undefined {
const name = referenceName(node)
return name === undefined ? undefined : { link: shownLink(node), name }