From 86b414262f294c5a619b747cc7ab08d7780124a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Tue, 5 Oct 2021 22:39:07 +0200 Subject: [PATCH] do not use fugly urlencoded tag in sidebar --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index d6c83f8..7ad60f7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -470,10 +470,10 @@ fn parse_garden>(text: S) -> anyhow::Result { links.push(dest.to_string()); } - if let Some(Event::Start(Tag::Link(_, dest, _))) = &last_nontext_event { + if let Some(Event::Start(Tag::Link(_, _, _))) = &last_nontext_event { if let Event::Text(str) = &event { if str.starts_with('#') { - tags.push(dest.to_string()); + tags.push(str[1..].to_string()); } } }