Skip to content

Commit

Permalink
Merge pull request #215 from adamtheturtle/rm-backspace
Browse files Browse the repository at this point in the history
Fix help text paragraph line breaks
  • Loading branch information
adamtheturtle authored Nov 7, 2024
2 parents b045895 + 9fe81c8 commit b5ee0b6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
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

0 comments on commit b5ee0b6

Please sign in to comment.