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

Allow options to contain multiple words #60

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Commits on Aug 31, 2022

  1. Allow options to contain multiple words

    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
    
    ```
    ::: mkdocs-click
        :module: foo.utils.bridge
        :prog_name: foo-utils bridge
        :command: cli
    ```
    
    now properly renders as
    
    > foo-utils bridge [OPTIONS]
    
    instead of
    
    > foo-utils [OPTIONS]
    
    or
    
    > bridge [OPTIONS]
    
    (^^ if prog_name wasn't specified at all)
    
    Co-Authored-By: Bar Hochman <bhochman@paloaltonetworks.com>
    
    Fixes mkdocs#42
    Hashem Nasarat committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    f8fc8e7 View commit details
    Browse the repository at this point in the history