bib: context-aware jump-link resolver — page/¶-ordinal/raw-anchor/quote refs + page↔paragraph transmutation #635
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
bib.frlink.resolve(ref, *, store, item_key=None) -> JumpLink(url, item_key, page, p_id, ordinal, snippet)accepting:"91 FR 44218"→{html_url}#page-44218— rule found by volume + page-range containment overfr_anchor_docs; ambiguity raises with candidates."91 FR 44218 ¶3"(alsopara 3/p.3) → 3rd paragraph on that page →#p-N."p-3600"(needs item_key or unambiguous context) → validated#p-3600.fr_anchors.text; exactly-one match required, zero/many raise with diagnostics.Transmutations both directions:
page_of(item_key, p_id),paragraphs_of("91 FR 44218")(anchors + ordinals + snippets).md_link(ref, text=None)renders[91 FR 44218 ¶3](url)for notebooks.Tests: every ref form, ambiguity errors, both transmutations, md output; live check that
resolve('91 FR 44218 ¶2')lands in the §414.1425 QP passage.Depends on #634. Spec: docs/superpowers/specs/2026-08-17-fr-jump-links-design.md.