Skip to content

Commit b96b244

Browse files
committed
update handlebars & fix tests & update doc
1 parent 6982b44 commit b96b244

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+72
-445
lines changed

Cargo.lock

Lines changed: 60 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ git2-curl = "0.19.0"
4545
gix = { version = "0.56.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] }
4646
gix-features-for-configuration-only = { version = "0.35.0", package = "gix-features", features = [ "parallel" ] }
4747
glob = "0.3.1"
48-
handlebars = { version = "3.5.5", features = ["dir_source"] }
48+
handlebars = { version = "4.5.0", features = ["dir_source"] }
4949
hex = "0.4.3"
5050
hmac = "0.12.1"
5151
home = "0.5.5"

crates/mdman/doc/out/mdman.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ man page:
4949
- Other helpers include:
5050
- `{{lower value}}` Converts the given value to lowercase.
5151

52-
5352
## OPTIONS
5453

5554
<dl>

crates/mdman/src/format/md.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ impl super::Formatter for MdFormatter {
3030
}
3131

3232
fn render_options_start(&self) -> &'static str {
33-
"<dl>"
33+
"<dl>\n"
3434
}
3535

3636
fn render_options_end(&self) -> &'static str {
37-
"</dl>"
37+
"</dl>\n"
3838
}
3939

4040
fn render_option(&self, params: &[&str], block: &str, man_name: &str) -> Result<String, Error> {
@@ -67,7 +67,7 @@ impl super::Formatter for MdFormatter {
6767
let rendered_block = self.render_html(block)?;
6868
write!(
6969
result,
70-
"<dd class=\"option-desc\">{}</dd>\n",
70+
"<dd class=\"option-desc\">{}</dd>\n\n",
7171
unwrap_p(&rendered_block)
7272
)?;
7373
Ok(result)

crates/mdman/src/format/text.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ impl super::Formatter for TextFormatter {
2626
fn render_options_start(&self) -> &'static str {
2727
// Tell pulldown_cmark to ignore this.
2828
// This will be stripped out later.
29-
"<![CDATA["
29+
"<![CDATA[\n"
3030
}
3131

3232
fn render_options_end(&self) -> &'static str {
33-
"]]>"
33+
"]]>\n"
3434
}
3535

3636
fn render_option(
@@ -46,7 +46,7 @@ impl super::Formatter for TextFormatter {
4646
let trimmed: Vec<_> = rendered_options.iter().map(|o| o.trim()).collect();
4747
// Wrap in HTML tags, they will be stripped out during rendering.
4848
Ok(format!(
49-
"<dt>{}</dt>\n<dd>{}</dd>\n<br>\n",
49+
"<dt>{}</dt>\n<dd>\n{}</dd>\n<br>\n",
5050
trimmed.join(", "),
5151
block
5252
))

crates/mdman/tests/compare/links.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Shortcut unknown: [shortcut unknown]
3232

3333
{{> links-include}}
3434

35+
3536
## OPTIONS
3637

3738
{{#options}}

crates/mdman/tests/compare/options.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ A named argument.
4646

4747
{{> options-common}}
4848

49+
4950
## EXAMPLES
5051

5152
1. An example

crates/mdman/tests/compare/vars.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
{{*set foo="Bar"}}
44

5+
56
{{foo}}
67

78
{{lower foo}}

src/doc/man/cargo-rustc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ See <https://doc.rust-lang.org/rustc/index.html> for documentation on rustc
2424
flags.
2525

2626
{{> description-one-target }}
27+
2728
To pass flags to all compiler processes spawned by Cargo, use the `RUSTFLAGS`
2829
[environment variable](../reference/environment-variables.html) or the
2930
`build.rustflags` [config value](../reference/config.html).

src/doc/man/cargo-rustdoc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ See <https://doc.rust-lang.org/rustdoc/index.html> for documentation on rustdoc
2424
flags.
2525

2626
{{> description-one-target }}
27+
2728
To pass flags to all rustdoc processes spawned by Cargo, use the
2829
`RUSTDOCFLAGS` [environment variable](../reference/environment-variables.html)
2930
or the `build.rustdocflags` [config value](../reference/config.html).

0 commit comments

Comments
 (0)