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

Fix help text paragraph line breaks #215

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ repos:
- id: file-contents-sorter
files: spelling_private_dict\.txt$
- id: trailing-whitespace
exclude: ^tests/test_doccmd/.*\.txt$
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
Expand Down
6 changes: 3 additions & 3 deletions src/doccmd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,17 +426,17 @@ def _run_args_against_docs(
help=(
"""\
The marker used to identify code blocks to be skipped.
\b

By default, code blocks which come just after a comment matching 'skip
doccmd[all]: next' are skipped (e.g. `.. skip doccmd[all]: next` in
reStructuredText, `<!--- skip doccmd[all]: next -->` in Markdown, or
`% skip doccmd[all]: next` in MyST).
\b

When using this option, those, and code blocks which come just after a
comment including the given marker are ignored. For example, if the
given marker is 'type-check', code blocks which come just after a
comment matching 'skip doccmd[type-check]: next' are also skipped.
\b

This marker is matched using a regular expression.
"""
),
Expand Down
28 changes: 16 additions & 12 deletions tests/test_doccmd/test_help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ Options:
other files, e.g. for ignoring in linter
configurations. [default: doccmd; required]
--skip-marker TEXT The marker used to identify code blocks to be
skipped.  By default, code blocks which come
just after a comment matching 'skip
doccmd[all]: next' are skipped (e.g. `.. skip
doccmd[all]: next` in reStructuredText, `<!---
skip doccmd[all]: next -->` in Markdown, or `%
skip doccmd[all]: next` in MyST).  When using
this option, those, and code blocks which come
just after a comment including the given
marker are ignored. For example, if the given
marker is 'type-check', code blocks which come
just after a comment matching 'skip
doccmd[type-check]: next' are also skipped. 
skipped.

By default, code blocks which come just after
a comment matching 'skip doccmd[all]: next'
are skipped (e.g. `.. skip doccmd[all]: next`
in reStructuredText, `<!--- skip doccmd[all]:
next -->` in Markdown, or `% skip doccmd[all]:
next` in MyST).

When using this option, those, and code blocks
which come just after a comment including the
given marker are ignored. For example, if the
given marker is 'type-check', code blocks
which come just after a comment matching 'skip
doccmd[type-check]: next' are also skipped.

This marker is matched using a regular
expression.
--pad-file / --no-pad-file Run the command against a temporary file
Expand Down