]> 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 19:59:31 +0000 (22:59 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 19 Aug 2013 19:59:31 +0000 (22:59 +0300)
determined minimal width of repeated subexpression is >0 (an empty line was
not matched in any case).

Lib/doctest.py

index 5dbd3d459e7ac6efd119eaee89c1868a6b23cb14..0b485f1f74e1910e588cd693960938f4935b5541 100644 (file)
@@ -553,7 +553,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)