#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:
RRTMissing ↦ templates/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.
#221 moved the inline rendering of broken (
Rel.RRTMissing) wikilinks from a hard-coded Pandoc AST inEmanote.Pandoc.Renderer.Url.renderSomeInlineRefWithinto a Heist template attemplates/components/broken-link.tpl. The siblingRel.RRTAmbiguousarm in the same function still buildsB.Strikeout,B.Str "❗", and oneDiagnostic.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:
RRTMissing↦templates/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:asideconsumed bypandoc.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:
openInNewTabAttrdecision).templates/components/ambiguous-link.tplmatching the existingRRTAmbiguousoutput.RRTAmbiguousinEmanote.Pandoc.Renderer.Urlto the sameHE.lookupHtmlTemplateMust+HE.runCustomTemplatepattern Add .tpl for rendering broken wikilinks, so the user can override it #221 introduced.pandoc.rewriteClassforemanote:error:aside(only consumer left after Add .tpl for rendering broken wikilinks, so the user can override it #221 lands) stays, gets renamed for symmetry withemanote:broken-link__aside, or is retired in favour of inlined Tailwind utilities (matching Add .tpl for rendering broken wikilinks, so the user can override it #221's choice).Out of scope: anything outside the two
Url.hsarms.