Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-MYST-019

Reference roles link to in-page targets

When a document uses `{ref}` to a heading, figure, table, equation or `(name)=` label, the extension SHALL render an in-page link showing the target text or the given text, and for a figure or table without a caption a readable link, not an empty one.

Step 2 of path 1 in StRS-MDOKFSTUDIO-MYST-009: from “The label shows an anchor icon” to “The reference is an in-page link”.

Scenarios 3

The situations the tests check; open one to read it.

nominalA reference to a heading shows the heading text
Given``{ref}`name` `` to a heading
Whenthe preview renders
Thena link shows the heading text without the anchor icon
boundaryExplicit text and paragraph labels
Given`{ref}` with explicit text and a target name, and a `{ref}` to a label on a paragraph
Whenthe preview renders
Thenthe given text is shown and the paragraph label becomes a plain #name link
boundaryCaptions decide the link text
Givena `{numref}` or `{ref}` that points to a figure or table without a caption, and a `{ref}` to a captioned table
Whenthe preview renders
Thena `{ref}` without caption shows the key, a `{numref}` shows its number (Figure 1, Table 1), no link is empty, the captioned table gives its caption as the link text, and a missing label raises no warning

Implemented in 2

Tested by 2

Replaces

SwRS-MDOKFSTUDIO-CORE-060Keep references to captionless targets readable superseded superseded by SwRS-MDOKFSTUDIO-MYST-019 Markdown file