Description
A wikilink with a label: argument scrolls to the labelled heading when clicked in edit mode. In preview mode the same link only opens the target note (at the top), so the section is ignored.
Steps to reproduce
target.typhas a labelled heading:== Some section <sec:intro>source.typlinks to it:#wikilink("target", display: "see section", label: "sec:intro")- Click the link in edit mode → jumps to the section (expected).
- Click the same link in preview mode → opens
targetbut does not jump to the section.
Expected: preview mode jumps to the labelled heading, as edit mode does.
Environment: inkycap-notebox 0.4.0 (.inkycap/format.json), Linux (Arch). I saw this with labels like sec:定义域即物理; I haven’t checked whether ASCII-only labels behave differently.
Possible cause (just a guess): in notebox.typ, the HTML <a> gets href="target.typ#label", but its data-target attribute contains only the note name. If the preview routes clicks through data-target, the label is lost.