From 4c9b46f57e3518f3d9efcdc2c644edf9cf187c8e Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 9 Oct 2026 12:02:45 +0200 Subject: [PATCH] Keep a directive mark's content on one line where it is emitted, as main does --- src/markdown/emit/inline-line.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markdown/emit/inline-line.ts b/src/markdown/emit/inline-line.ts index 868d0b4..b9d810e 100644 --- a/src/markdown/emit/inline-line.ts +++ b/src/markdown/emit/inline-line.ts @@ -282,7 +282,7 @@ function emitMarkedRun(nodes: readonly AdfNode[], mark: AdfMark, depth: number, if (spelling.kind === 'emphasis') return emitEmphasis(nodes, spelling.spelling, depth, range, context) const link = spelling.kind === 'link' ? tryLink(nodes, mark, depth, range, context) : undefined if (link !== undefined) return link - const inner = emitRun(nodes, depth + 1, index, { ...context, bracketed: true }) + const inner = emitRun(nodes, depth + 1, index, { ...context, bracketed: true, spansLines: false }) if (!inner.ok) return inner if (inner.value.carry !== undefined) return inner return success({ segments: [syntax(spellInlineDirectiveOpener(mark.type)), ...inner.value.segments, syntax(`]${attributes}`)] })