Skip to content

Templatize ambiguous-link inline rendering (mirror #221 for RRTAmbiguous) #712

Description

@srid

#221 moved the inline rendering of broken (Rel.RRTMissing) wikilinks from a hard-coded Pandoc AST in Emanote.Pandoc.Renderer.Url.renderSomeInlineRefWith into a Heist template at templates/components/broken-link.tpl. The sibling Rel.RRTAmbiguous arm in the same function still builds B.Strikeout, B.Str "❗", and one Diagnostic.errorInlineAside "aside" per candidate route in Haskell.

The two arms are structurally the same concern ("this link cannot be resolved, tell the user"), and they used to share their AST shape. After #221 they diverge:

  • RRTMissingtemplates/components/broken-link.tpl, semantic class hooks (emanote:broken-link__*), notebook authors override structure by dropping in their own .tpl.
  • RRTAmbiguous ↦ Haskell-built AST, emanote:error:aside consumed by pandoc.rewriteClass, no template seam.

Hickey/Lowy review on the #221 PR called the asymmetry out. The defer reason then was narrow: ambiguous-link rendering iterates over a list of candidate routes (variable length), and a list-of-candidates Heist splice protocol does not exist yet — broken-link's flat fixed structure didn't need one.

Scope of this issue:

Out of scope: anything outside the two Url.hs arms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions