diff --git a/crates/trawler/src/main.rs b/crates/trawler/src/main.rs index 033003e..b45d8df 100644 --- a/crates/trawler/src/main.rs +++ b/crates/trawler/src/main.rs @@ -3081,8 +3081,17 @@ fn render_inline(para: &mut ParagraphText, inline: &Inline) { } Inline::Reference { display, kind } => { let start = para.text.len(); + // A tag's display (`#name`) already carries its `#` marker and + // reads that way in the source too — bracketing it `[[#name]]` + // both added noise and made the rendered text longer than the + // raw source, shifting everything after it on focus. The + // bracketed kinds keep their source-matching `[[...]]` chrome. + let shown = match kind { + ReferenceKind::Tag(_) => display.clone(), + _ => format!("[[{display}]]"), + }; para.push_run( - &format!("[[{display}]]"), + &shown, run_font(UI_FONT, para.force_bold, false), rgb(REFERENCE_COLOR).into(), None,