`#wikilink(label: ...)` jumps to the section in edit mode, but only opens the note in preview mode

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

  1. target.typ has a labelled heading: == Some section <sec:intro>
  2. source.typ links to it: #wikilink("target", display: "see section", label: "sec:intro")
  3. Click the link in edit mode → jumps to the section (expected).
  4. Click the same link in preview mode → opens target but 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.

Thanks for your report. Please post this in Forgejo itself, we haven’t made any changes to this part of the code base.