Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase heading & ToC indentation levels for subcommands #31

Open
chadoh opened this issue Jul 8, 2024 · 0 comments
Open

Increase heading & ToC indentation levels for subcommands #31

chadoh opened this issue Jul 8, 2024 · 0 comments

Comments

@chadoh
Copy link

chadoh commented Jul 8, 2024

Given a CLI like:

git remote add
git remote rm
git remote set-url
git submodule init
git submodule deinit

clap-markdown should generate a TOC like:

- git
- git remote
  - git remote add
  - git remote rm
  - git remote set-url
- git submodule
  - git submodule init
  - git submodule deinit

And yes, we should skip increasing the indent level for first-level subcommands, otherwise the only thing at the main level will be the root command, which is silly.

It should likewise increase the heading levels for each subcommand nest level, all the way to h6 (######) and then to simple bold tags for CLIs with nesting beyond six levels (😱).

## `git`

Git is a fast, scalable, distributed revision control system.

## `git remote`

Manage the set of repositories ("remotes") whose branches you track.

### `git remote add`

Add a remote named <name> for the repository at <URL>. 

### `git remote rm`

Remove the remote named <name>. 

### `git remote set-url`

Changes URLs for the remote. 

## `git submodule`

A submodule is a repository embedded inside another repository. 

### `git submodule init`

Initialize the submodules recorded in the index.

### `git submodule deinit`

Unregister the given submodules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant