gumdrop icon indicating copy to clipboard operation
gumdrop copied to clipboard

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

Open Nemo157 opened this issue 4 years ago • 0 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)]

Nemo157 avatar Aug 12 '20 14:08 Nemo157