3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-12 11:48:29 +01:00

Name parseInlineContent as the caller asking the emitter about an opening link

This commit is contained in:
2026-10-23 10:35:34 +02:00
committed by Lillem4n
parent 45515e9c85
commit abb2b417ff
+1 -1
View File
@@ -232,7 +232,7 @@ function directiveMarkPieces(scan: Scan, name: string, mark: AdfMark, slot: read
return success([...marked.filter((piece) => piece.kind === 'nodes'), ...besideLink(images, link)])
}
// spec/flavour.md, Marks. A link opening a paragraph may still need the directive form for the line it opens, which `assemble` asks the emitter.
// spec/flavour.md, Marks. A link opening a paragraph may still need the directive form for the line it opens, which `parseInlineContent` asks the emitter.
function refuseLinkDirective(scan: Scan, mark: AdfMark, nodes: readonly Inline[], index: number): Result<Piece[]> | undefined {
const href = linkHref(nodeAttrs(mark))
if (href === undefined) return failure('unsupported-node-shape', hreflessLink, scan.path)