From 5a0b46690e03a6b8d09e8172dfbb450c939f0bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8A=E3=81=8D=E8=90=8C?= Date: Mon, 15 Sep 2025 23:22:06 +0200 Subject: [PATCH] make headings contain links to themselves --- src/html/djot.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/html/djot.rs b/src/html/djot.rs index 45a6f8d..5e475de 100644 --- a/src/html/djot.rs +++ b/src/html/djot.rs @@ -311,6 +311,9 @@ impl<'a> Writer<'a> { } match c { + Container::Heading { id, .. } => { + write!(out, r##">"##)?; + } Container::TableCell { alignment, .. } if !matches!(alignment, Alignment::Unspecified) => { @@ -445,7 +448,7 @@ impl<'a> Writer<'a> { } out.push_str("

"); } - Container::Heading { level, .. } => write!(out, "")?, + Container::Heading { level, .. } => write!(out, "
")?, Container::TableCell { head: false, .. } => out.push_str(""), Container::TableCell { head: true, .. } => out.push_str(""), Container::Caption => out.push_str(""),