We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 534ea82 commit c2ca08aCopy full SHA for c2ca08a
1 file changed
pytest_doctestplus/sphinx/doctestplus.py
@@ -26,7 +26,7 @@ class DoctestSkipDirective(Directive):
26
def run(self):
27
# Check if there is any valid argument, and skip it. Currently only
28
# 'win32' is supported.
29
- if re.match('win32', self.content[0]):
+ if len(self.content) > 0 and re.match("win32", self.content[0]):
30
self.content = self.content[2:]
31
code = '\n'.join(self.content)
32
return [literal_block(code, code)]
0 commit comments