Skip to content

Commit

Permalink
Use verbose regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Jul 12, 2022
1 parent 6e6d21a commit 17d3c00
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pytest_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ def _is_doctest(config, path, parent):
_OPTION_SKIPIF_RE = re.compile(r':skipif:\s*([^\n\'"]*)$')

_DIRECTIVE_RE = re.compile(
r"\s*\.\. ("
r"testcode|testoutput|testsetup|testcleanup|doctest"
r')::\s*([^\n\'"]*)$'
r"""\s*\.\.\s
(testcode|testoutput|testsetup|testcleanup|doctest)
::\s*([^\n'"]*)$
""", re.VERBOSE
)


Expand Down

0 comments on commit 17d3c00

Please sign in to comment.