jacobdeichert/mask

Don't add a command for a heading that has no code blocks

jacobdeichert opened this issue · 0 comments

When a heading has no code blocks AND its child headings have no code blocks, then we shouldn't create a command for it.

Example:

# MY COMMANDS

## Docs

Just some documentation.

## cmd
~~~bash
echo something
~~~

Current Behaviour

mask -h

mask 0.8.0

USAGE:
    mask [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

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

SUBCOMMANDS:
    Docs        
    cmd

Desired Behaviour

mask -h

mask 0.8.0

USAGE:
    mask [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

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

SUBCOMMANDS:
    cmd