Skip to content

Commit a79c449

Browse files
author
Matthias Koeppe
committed
src/sage/doctest/parsing.py: Remove '...' continuation line pattern from backslash replacer
1 parent 51a6c42 commit a79c449

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/sage/doctest/parsing.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,14 +1085,22 @@ def parse(self, string, *args):
10851085
"P = polytopes.associahedron(['A',3])\n",
10861086
"P = polytopes.associahedron(['A',Integer(3)])\n"),
10871087
'\n']
1088+
1089+
sage: example4 = '::\n\n sage: C.minimum_distance(algorithm="guava") # optional - guava\n ...\n 24\n\n'
1090+
sage: parsed4 = DTP.parse(example4)
1091+
sage: dte = parsed4[1]
1092+
sage: dte.sage_source
1093+
'C.minimum_distance(algorithm="guava") # optional - guava\n'
1094+
sage: dte.want
1095+
'...\n24\n'
10881096
"""
10891097
# Regular expressions
10901098
find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M)
10911099
find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M)
10921100
find_python_continuation = re.compile(r"^(\s*)\.\.\.([^\.])", re.M)
10931101
python_prompt = re.compile(r"^(\s*)>>>", re.M)
10941102
backslash_replacer = re.compile(r"""(\s*)sage:(.*)\\\ *
1095-
\ *(((\.){4}:)|((\.){3}))?\ *""")
1103+
\ *((\.){4}:)?\ *""")
10961104

10971105
# The following are used to allow ... at the beginning of output
10981106
ellipsis_tag = "<TEMP_ELLIPSIS_TAG>"

0 commit comments

Comments
 (0)