]> granicus.if.org Git - python/commitdiff
Issue #18647: A regular expression in the doctest module rewritten so that
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 19 Aug 2013 20:04:52 +0000 (23:04 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 19 Aug 2013 20:04:52 +0000 (23:04 +0300)
determined minimal width of repeated subexpression is >0 (an empty line was
not matched in any case).

Lib/doctest.py

index 3e563c6a9cddc32b1042d751a41abd55e78105a3..efa07d7ea51e2dca466fd92dcdb42c48d11edafc 100644 (file)
@@ -564,7 +564,7 @@ class DocTestParser:
         # Want consists of any non-blank lines that do not start with PS1.
         (?P<want> (?:(?![ ]*$)    # Not a blank line
                      (?![ ]*>>>)  # Not a line starting with PS1
-                     .*$\n?       # But any other line
+                     .+$\n?       # But any other line
                   )*)
         ''', re.MULTILINE | re.VERBOSE)