Skip to content

Commit

Permalink
feat: add option to hide footer
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante authored and ConnorGray committed Jun 15, 2024
1 parent 88d264a commit 4c0f5a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub fn print_help_markdown<C: clap::CommandFactory>() {
#[derive(Default)]
pub struct MarkdownOptions {
pub title: Option<String>,
pub hide_footer: bool,
}

fn write_help_markdown(
Expand Down Expand Up @@ -119,14 +120,15 @@ fn write_help_markdown(
//-----------------
// Write the footer
//-----------------

write!(buffer, r#"<hr/>
if !options.hide_footer {
write!(buffer, r#"<hr/>
<small><i>
This document was generated automatically by
<a href="https://crates.io/crates/clap-markdown"><code>clap-markdown</code></a>.
</i></small>
"#).unwrap();
}
}

fn build_table_of_contents_markdown(
Expand Down

0 comments on commit 4c0f5a7

Please sign in to comment.