Skip to content

How to parse inline code both on command line and rst? #68

Open
@fgvieira

Description

@fgvieira

I have some arguments with inline code. For example:

    group_exec.add_argument(
        "--dry-run",
        "--dryrun",
        "-n",
        dest="dryrun",
        action="store_true",
        help="Do not execute anything, and display what would be done. If you have a very large workflow, use `--dry-run --quiet` to just print a summary of the DAG of jobs.",
    )

Ideally, this would show as:

Do not execute anything, and display what would be done. If you have a very large workflow, use --dry-run --quiet to just print a summary of the DAG of jobs.

But, since it gets converted to RST, it gets parsed as:

Do not execute anything, and display what would be done. If you have a very large workflow, use `--dry-run --quiet` to just print a summary of the DAG of jobs.

I guess I could have:

    group_exec.add_argument(
        "--dry-run",
        "--dryrun",
        "-n",
        dest="dryrun",
        action="store_true",
        help="Do not execute anything, and display what would be done. If you have a very large workflow, use ``--dry-run --quiet`` to just print a summary of the DAG of jobs.",
    )

But it would look weird when running -h in the command line.

Is there a way to show the help in the command-line as single back-ticks but to be rendered as inline code?

thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions