Behaviour SwRS-MDOKFSTUDIO-CORE-010
Wikilinks render as links where they are text
When a document holds `[[Note]]`, `[[Folder/Note#Heading|Label]]` or `[[#Section]]` in plain text, the extension SHALL render a link, with a `wiki:` URL for a note target and an in-page slug anchor for a heading-only target, and leave `[[...]]` unconverted where it appears in code, an existing link, an image, math, raw HTML or an `![[...]]` embed.
Part of StRS-MDOKFSTUDIO-CORE-001, outside the paths drawn on its map.
Scenarios 3
The situations the tests check; open one to read it.
nominalRender wikilinks as links
Givena paragraph with `[[Note]]` and `[[#Section]]`
Whenit is rendered
Thenthe first is a link with a `wiki:` URL and the second an in-page `#section` anchor
boundaryA label is the link text
Givena wikilink with a `|Label`, as in `[[Folder/Note#Heading|Label]]`
Whenit is rendered
Thenthe link text is the label
refusalLeave wikilink syntax untouched where it is not text
| Input | Outcome |
|---|---|
| `[[Note]]` inside inline code | the text stays literal code |
| `[[Note]]` inside an existing link, an image, math, an HTML block or an HTML tag itself | it is not converted to a wikilink |
| `[[Note]]` as the text between two inline HTML tags, as in `<span>[[Note]]</span>` | it is converted like any text ("raw HTML" is the block or the tag, not the text it wraps) |
| an `![[Note]]` embed | it is not converted to a link |
Implemented in 1
Tested by 2
Replaces
SwRS-MDOKFSTUDIO-CORE-011Leave wikilink syntax untouched where it is not text superseded superseded by SwRS-MDOKFSTUDIO-CORE-010 Markdown file