We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 432bc5e commit ad0c343Copy full SHA for ad0c343
sphinx/ext/doctest.py
@@ -38,7 +38,7 @@
38
logger = logging.getLogger(__name__)
39
40
blankline_re = re.compile(r'^\s*<BLANKLINE>', re.MULTILINE)
41
-doctestopt_re = re.compile(r'#\s*doctest:.+$', re.MULTILINE)
+doctestopt_re = re.compile(r'[ \t]*#\s*doctest:.+$', re.MULTILINE)
42
43
44
def is_allowed_version(spec: str, version: str) -> bool:
tests/test_transforms/test_transforms_post_transforms_code.py
@@ -15,6 +15,8 @@ def test_trim_doctest_flags_html(app):
15
assert 'QUUX' not in result
16
assert 'CORGE' not in result
17
assert 'GRAULT' in result
18
+ assert '<span class="n">now</span><span class="p">()</span> \n' not in result
19
+ assert '<span class="n">now</span><span class="p">()</span>\n' in result
20
21
22
@pytest.mark.sphinx(
0 commit comments