Skip to content

Commit

Permalink
Fix wrong format
Browse files Browse the repository at this point in the history
  • Loading branch information
Zh40Le1ZOOB committed Dec 16, 2023
1 parent 73d11c6 commit 17c817e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/html_handlebars/hbs_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,7 @@ fn insert_link_into_header(

if html_config.header_link {
format!(
r##"<h{level} id="{id}"{classes}><a class="header" href="#{id}">
{text}</a></h{level}>"##,
r##"<h{level} id="{id}"{classes}><a class="header" href="#{id}">{text}</a></h{level}>"##,
level = level,
id = id,
text = content,
Expand Down Expand Up @@ -1089,6 +1088,7 @@ mod tests {

#[test]
fn original_build_header_links() {
let html_config = HtmlConfig::default();
let inputs = vec![
(
"blah blah <h1>Foo</h1>",
Expand Down Expand Up @@ -1132,7 +1132,7 @@ mod tests {
];

for (src, should_be) in inputs {
let got = build_header_links(src);
let got = build_header_links(src, &html_config);
assert_eq!(got, should_be);
}
}
Expand Down

0 comments on commit 17c817e

Please sign in to comment.