diff --git a/src/utils/markdown.rs b/src/utils/markdown.rs index 2a7d01f..d9cc594 100644 --- a/src/utils/markdown.rs +++ b/src/utils/markdown.rs @@ -209,11 +209,11 @@ fn fix_headers_ids(html: &str, path: Option<&FilePath>) -> String { rewrite_str( html, RewriteStrSettings { - // TODO: footnotes are broken - // This should be: a:not(.footnote-ref a, a.footnote-backref)[href^='#'] element_content_handlers: vec![element!( - "a:not(.footnote-ref):not(.footnote-backref)[href^='#']", + "a:not([data-footnote-ref]):not(.footnote-backref)[href^='#']", |el| { + println!("{el:?}"); + let id = el.get_attribute("id").unwrap_or( path_to_hid(path) + remove_first_letter(&el.get_attribute("href").unwrap()), );