Skip to content

docs(specs): markdown viewer anchor links (GH13725) - #14965

Draft
fbartho wants to merge 2 commits into
warpdotdev:masterfrom
fbartho:fb/13725-anchors-spec
Draft

docs(specs): markdown viewer anchor links (GH13725)#14965
fbartho wants to merge 2 commits into
warpdotdev:masterfrom
fbartho:fb/13725-anchors-spec

Conversation

@fbartho

@fbartho fbartho commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Closes #13725

Product + technical spec for anchor links in the Markdown viewer: raw <a href> links, explicit <a id>/<a name> targets, GitHub-style heading slugs, and cross-document fragments (other-file.md#section).

#13962 remains open as the implementation this spec describes.

Product and tech spec for raw `<a href>`/`<a id>` anchor links and
in-document fragment navigation in the Markdown viewer.

The viewer already has the click branch, the scroll primitive, and a
per-click heading walk; the defect is that find_matching_header compares
a fragment against a heading's exact lowercased text, so a hyphenated
`#target-section` cannot match a heading reading "Target Section". The
spec scopes the fix to a Unicode-preserving slug normalizer applied to
both sides of that comparison, plus an `<a href>` inline token reusing
the existing Hyperlink::Url styling, explicit anchor targets resolved by
the same click-time walk, and cross-document fragment navigation with
its three prerequisite resolution repairs.

All file:line references verified against master at 495f975.
The spec described the design but not what ships together. Add a
delivery-scope section grouping the sixteen invariants into the three
slices the work decomposes into, and a matching sequencing note in the
tech spec explaining why that order holds (the explicit-target work
reuses the heading resolver; cross-document navigation carries the
three resolution repairs as prerequisites).

Record the visible-literal-anchor-text limitation as current intended
behavior rather than a deferred gap: hiding the tag needs a
save-round-trippable content-model representation, tracked as warpdotdev#13982.
@cla-bot cla-bot Bot added the cla-signed label Aug 11, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Markdown viewer: support <a href> and <a id> anchor links

1 participant