mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-18 22:25:44 +01:00
Answer architecture round 1: one owner for the image's ADF shape, the readings' decision, marker paragraphs, the exceptions the README names; items 87 filed and 56 widened
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import type { AdfNode } from '../adf/document.ts'
|
||||
|
||||
// spec/flavour.md, The CommonMark image: the shape `` reads to, and the only one written back as it.
|
||||
export function centeredImage(content: AdfNode[]): AdfNode {
|
||||
return { attrs: { layout: 'center' }, content, type: 'mediaSingle' }
|
||||
}
|
||||
|
||||
export function externalMedia(alt: string, url: string): AdfNode {
|
||||
return { attrs: alt === '' ? { type: 'external', url } : { alt, type: 'external', url }, type: 'media' }
|
||||
}
|
||||
Reference in New Issue
Block a user