murarth / gumdrop

Rust option parser with custom derive support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple doc attributes are not supported, and multi-line doc comments retain their exact whitespace

Nemo157 opened this issue · comments

#[derive(Debug, gumdrop::Options)]
struct Args {
    /// Which base58 alphabet to decode/encode with [possible values: bitcoin, monero,
    /// ripple, flickr or custom(abc...xyz)]
    alphabet: Alphabet,

    help: bool
}

This will only display the first line of doc comment in --help.


#[derive(Debug, gumdrop::Options)]
struct Args {
     /** Which base58 alphabet to decode/encode with [possible values: bitcoin, monero,
      ripple, flickr or custom(abc...xyz)] */
    alphabet: Alphabet,

    help: bool
}

This retains the indentation from the multi-line doc comment resulting in misaligned text in --help

Optional arguments:
  -a, --alphabet ALPHABET  Which base58 alphabet to decode/encode with [possible values: bitcoin, monero,
     ripple, flickr or custom(abc...xyz)]