Skip to content

Commit

Permalink
fix(converter): remove possible links from the produced HTML heading …
Browse files Browse the repository at this point in the history
…IDs (2)

This commit also removes them from headers that exceeds the level 6
  • Loading branch information
NTBBloodbath committed Feb 9, 2025
1 parent a22e6de commit 1ad4982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/converter/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl NorgToHtml for NorgAST {
}
// XXX: fallback to h6 if the header level is higher than 6
_ => {
section.push(format!("<h6 id=\"{}\"", heading_title.replace(" ", "-")));
section.push(format!("<h6 id=\"{}\"", re.replace(&heading_title.replace(" ", "-"), "")));
if !weak_carry.is_empty() {
for weak_carryover in weak_carry.clone() {
section.push(weak_carryover_attribute(weak_carryover));
Expand Down

0 comments on commit 1ad4982

Please sign in to comment.