Format with cargo correctly
This commit is contained in:
parent
1700783594
commit
8a82f6336a
|
@ -54,11 +54,8 @@ impl HtmlHandlebars {
|
||||||
let content = ch.content.clone();
|
let content = ch.content.clone();
|
||||||
let content = utils::render_markdown(&content, ctx.html_config.curly_quotes);
|
let content = utils::render_markdown(&content, ctx.html_config.curly_quotes);
|
||||||
|
|
||||||
let fixed_content = utils::render_markdown_with_path(
|
let fixed_content =
|
||||||
&ch.content,
|
utils::render_markdown_with_path(&ch.content, ctx.html_config.curly_quotes, Some(path));
|
||||||
ctx.html_config.curly_quotes,
|
|
||||||
Some(path),
|
|
||||||
);
|
|
||||||
if !ctx.is_index {
|
if !ctx.is_index {
|
||||||
// Add page break between chapters
|
// Add page break between chapters
|
||||||
// See https://developer.mozilla.org/en-US/docs/Web/CSS/break-before and https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before
|
// See https://developer.mozilla.org/en-US/docs/Web/CSS/break-before and https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-before
|
||||||
|
|
|
@ -560,7 +560,9 @@ fn edit_url_has_default_src_dir_edit_url() {
|
||||||
let index_html = temp.path().join("book").join("index.html");
|
let index_html = temp.path().join("book").join("index.html");
|
||||||
assert_contains_strings(
|
assert_contains_strings(
|
||||||
index_html,
|
index_html,
|
||||||
&[r#"href="https://github.com/rust-lang/mdBook/edit/master/guide/src/README.md" title="Suggest an edit""#],
|
&[
|
||||||
|
r#"href="https://github.com/rust-lang/mdBook/edit/master/guide/src/README.md" title="Suggest an edit""#,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,7 +586,9 @@ fn edit_url_has_configured_src_dir_edit_url() {
|
||||||
let index_html = temp.path().join("book").join("index.html");
|
let index_html = temp.path().join("book").join("index.html");
|
||||||
assert_contains_strings(
|
assert_contains_strings(
|
||||||
index_html,
|
index_html,
|
||||||
&[r#"href="https://github.com/rust-lang/mdBook/edit/master/guide/src2/README.md" title="Suggest an edit""#],
|
&[
|
||||||
|
r#"href="https://github.com/rust-lang/mdBook/edit/master/guide/src2/README.md" title="Suggest an edit""#,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue