diff --git a/src/lib.rs b/src/lib.rs index b7c48fd..c9e16e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -377,9 +377,6 @@ fn build_command_markdown( } fn write_arg_markdown(buffer: &mut String, arg: &clap::Arg) -> fmt::Result { - // Markdown list item - write!(buffer, "* ")?; - let value_name: String = match arg.get_value_names() { // TODO: What if multiple names are provided? Some([name, ..]) => name.as_str().to_owned(), @@ -389,6 +386,8 @@ fn write_arg_markdown(buffer: &mut String, arg: &clap::Arg) -> fmt::Result { None => arg.get_id().to_string().to_ascii_uppercase(), }; + // Markdown list item + write!(buffer, "* ")?; match (arg.get_short(), arg.get_long()) { (Some(short), Some(long)) => { if arg.get_action().takes_values() {