mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 22:55:44 +01:00
Name parseInlineContent as the caller asking the emitter about an opening link
This commit is contained in:
@@ -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)])
|
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 {
|
function refuseLinkDirective(scan: Scan, mark: AdfMark, nodes: readonly Inline[], index: number): Result<Piece[]> | undefined {
|
||||||
const href = linkHref(nodeAttrs(mark))
|
const href = linkHref(nodeAttrs(mark))
|
||||||
if (href === undefined) return failure('unsupported-node-shape', hreflessLink, scan.path)
|
if (href === undefined) return failure('unsupported-node-shape', hreflessLink, scan.path)
|
||||||
|
|||||||
Reference in New Issue
Block a user