3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 07:05:44 +01:00

Answer prose round 1: 0 🔴, 8 🟡; split the image-in-link ruling out, place the (image) plainly, credit only the same-URL rule to the portable writer

This commit is contained in:
2026-10-23 03:39:36 +02:00
committed by Lillem4n
parent 17722a0f57
commit ef14f98c3e
7 changed files with 34 additions and 32 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ export function externalMedia(alt: string, url: string, link?: LinkDefinition):
return link === undefined ? media : { ...media, marks: [linkMark(link)] }
}
// The ` (image)` after a link for an image inside it, as the readers build it (spec/flavour.md, The CommonMark image) and `adfToPortableMarkdown` writes it; `link` builds `image`.
// The ` (image)` after a link for an image inside it, as the readers build it (spec/flavour.md, The CommonMark image) and `adfToPortableMarkdown` writes it; `link` builds the linked word `image`.
export function imageAside(link: (text: string) => AdfNode[]): AdfNode[] {
return [{ text: ' (', type: 'text' }, ...link('image'), { text: ')', type: 'text' }]
}