3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-18 22:25:44 +01:00

Answer prose round 1: one sentence per idea for the image readings, a decision title that states the rule, item 86 names its shapes

This commit is contained in:
2026-10-09 03:58:35 +02:00
committed by Lillem4n
parent 446efded6c
commit ee3086ad1e
12 changed files with 58 additions and 58 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import type { AdfNode } from '../adf/document.ts'
// spec/flavour.md, The CommonMark image: `![alt](url)` reads to `centeredImage([externalMedia(alt, url)])`, the only shape written back as it.
// spec/flavour.md, The CommonMark image: `![alt](url)` reads to `centeredImage([externalMedia(alt, url)])`, the only shape `adfToLosslessMarkdown` writes as `![alt](url)`.
export function centeredImage(content: AdfNode[]): AdfNode {
return { attrs: { layout: 'center' }, content, type: 'mediaSingle' }
}