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

panics if before_help is set #21

Closed
jyn514 opened this issue May 23, 2024 · 2 comments
Closed

panics if before_help is set #21

jyn514 opened this issue May 23, 2024 · 2 comments

Comments

@jyn514
Copy link

jyn514 commented May 23, 2024

i have a CLI tool that sets before_help to a non-empty string. when i try and use clap_markdown to generate markdown help, it panics:

thread 'main' panicked at /home/jyn/.local/lib/cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-markdown-0.1.3/src/lib.rs:241:5:
assertion failed: command.get_before_help().is_none()
stack backtrace:
   3: clap_markdown::build_command_markdown
             at /home/jyn/.local/lib/cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-markdown-0.1.3/src/lib.rs:241:5
   4: clap_markdown::build_command_markdown
             at /home/jyn/.local/lib/cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-markdown-0.1.3/src/lib.rs:329:9
   5: clap_markdown::write_help_markdown
             at /home/jyn/.local/lib/cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-markdown-0.1.3/src/lib.rs:89:5
   6: clap_markdown::help_markdown_command
             at /home/jyn/.local/lib/cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-markdown-0.1.3/src/lib.rs:31:5

it would be nice for this to be supported so i don't have to work around it in my own code.

@jyn514
Copy link
Author

jyn514 commented May 23, 2024

looks like this would be fixed by #16

@ConnorGray
Copy link
Owner

This should be fixed in the latest clap-markdown 0.1.4 release, just published 🚂

If you still encounter issues, please feel free to reopen or file a new issue.

Thank you for using clap-markdown! 🙂

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

2 participants