This PR is based on and supersedes the one in #44. I added more explanation, a test, and fixed a small bug with trailing whitespace.
When documenting subcommands, sometimes mkdocs-click will only show the
subcommand name. :prog_name: seems to be the right option to ensure
the actuall command is shown, but due to an overly-strict regex, it
used to ignore everything after the first whitespace. With this change,
prog_name and other commands can contain multiple words in their
values.
This PR is based on and supersedes the one in #44. I added more explanation, a test, and fixed a small bug with trailing whitespace.
When documenting subcommands, sometimes mkdocs-click will only show the subcommand name.
:prog_name:
seems to be the right option to ensure the actuall command is shown, but due to an overly-strict regex, it used to ignore everything after the first whitespace. With this change,prog_name
and other commands can contain multiple words in their values.For example
now properly renders as
instead of
or
(^^ if prog_name wasn't specified at all)
Co-Authored-By: Bar Hochman bhochman@paloaltonetworks.com