You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Opt-in wiki link support ([[target|label]]) via md4cFlags.wikiLinks #1114
Is your feature request related to a problem? Please describe.
We render LLM output in a note-taking app with EnrichedMarkdownText. Notes in our app link to each other with [[Title]] / [[Title|target]] (Obsidian-style wiki links), so the model often writes them in its replies too. Right now [[Title]] is shown as plain text with brackets: it isn't tappable and doesn't reach onLinkPress.
The bundled parser already supports this. cpp/enrmrkd/enrmrkd.h defines ENRMRKD_FLAG_WIKILINKS and ENRMRKD_SPAN_WIKILINK (with a target attribute), but MD4CParser.cpp never sets the flag and the span isn't mapped to a node, so there's no way to turn it on from JS.
Describe the solution you'd like
An opt-in md4cFlags.wikiLinks flag (default false, same as underline/highlight). When it's on:
[[target]] and [[target|label]] render as links (label text if present, otherwise target).
Pressing one calls onLinkPress / onLinkLongPress with the raw target as url, so the app can resolve it (open a note, search by title, …). An alternative is a separate isWikiLink: true on the event, or a prefix such as wiki: on the url.
They pick up the normal link styling, and work with linkVariants / link pills / linkContextMenuItems the same way regular links do, so apps can tell them apart from web links.
Describe alternatives you've considered
Rewriting [[...]] to [label](scheme://target) before rendering. This works for us, but it has to run on every streaming chunk and needs to skip code spans/blocks, which the parser already handles correctly.
linkRecognition.text (in nightly) with a \[\[[^\]]+\]\] regex. The brackets stay in the displayed text and there's no label/target split.
Additional context
Version checked: 1.2.0-nightly-20261029-266ba6bca (the same applies to 1.1.1). Platforms: iOS and Android (web too, ideally). We're happy to test a PR.
Hello @ryzencool! Thanks for your input in this library development!
Your request sounds like a valuable feature for our library. We'll work on it as soon as our capacity allows us. We'll inform you when the feature will be available in the nightly version of the library.
Activity
jnowakow commentedon Nov 2, 2026
Hello @ryzencool! Thanks for your input in this library development!
Your request sounds like a valuable feature for our library. We'll work on it as soon as our capacity allows us. We'll inform you when the feature will be available in the nightly version of the library.