Skip to content

Commit

Permalink
chore(_DIRECTIVE_RE): Use verbose regular expression
Browse files Browse the repository at this point in the history
  • Loading branch information
tony authored and twmr committed Jul 12, 2022
1 parent 9b0081c commit e3cf48b
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 e3cf48b

Please sign in to comment.