jacobdeichert / mask

🎭 A CLI task runner defined by a simple markdown file
MIT License
1.11k stars 55 forks source link

Command description bug with options #112

Open jacobdeichert opened 4 months ago

jacobdeichert commented 4 months ago

When writing "OPTIONS" right after the description (without an empty line in between), it causes the description to be listed as "OPTIONS".

## bad_desc
> this should be the description
**OPTIONS**
* whatever
    * flags: -w --whatever
    * desc: Whatever

~~~bash
echo "the description is wrong..."
~~~

Run mask help and see the output contains the wrong description for bad_desc:

mask 0.11.4

USAGE:
    mask [FLAGS] [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help          Prints help information
        --introspect    Print out the maskfile command structure in json
    -V, --version       Prints version information

OPTIONS:
        --maskfile <maskfile>    Path to a different maskfile you want to use

SUBCOMMANDS:
    bad_desc    OPTIONS