do not use fugly urlencoded tag in sidebar

This commit is contained in:
Tomáš Mládek 2021-10-05 22:39:07 +02:00
parent 71ce442f64
commit 86b414262f

View file

@ -470,10 +470,10 @@ fn parse_garden<S: AsRef<str>>(text: S) -> anyhow::Result<ParseResult> {
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());
}
}
}