Skip to main content

Module wikilinks

Module wikilinks 

Source
Expand description

Pandoc wikilink extensions: wikilinks_title_after_pipe and wikilinks_title_before_pipe.

Shape: [[url]] (or [[url|title]] with after-pipe semantics, or [[title|url]] with before-pipe). Image variant: ![[url]] / ![[url|title]]. Single line, non-greedy on the first ]], rejects empty body. When both extensions are enabled, after-pipe wins (matches pandoc behavior).

Title content is NOT recursively parsed for inlines — [[url|**bold**]] emits the title as a flat TEXT span containing the literal bytes **bold**. Verified against pandoc 3.9.0.2 -f markdown+wikilinks_title_after_pipe -t native.

Lives in the inline IR’s ConstructKind dispatch path so that everything inside [[...]] is opaque to emphasis / bracket / autolink resolution. The emitter walks the byte range and re-locates the pipe.