Skip to content

Commit 4b54e9c

Browse files
kwankyuMatthias Koeppe
authored andcommitted
src/sage/doctest/parsing.py: Do not insert extra newline when handling doctest line continuations
1 parent 0fd5967 commit 4b54e9c

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/sage/doctest/parsing.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,13 +1087,8 @@ def parse(self, string, *args):
10871087
# doctest system.
10881088
m = backslash_replacer.search(string)
10891089
while m is not None:
1090-
next_prompt = find_sage_prompt.search(string, m.end())
10911090
g = m.groups()
1092-
if next_prompt:
1093-
future = string[m.end():next_prompt.start()] + '\n' + string[next_prompt.start():]
1094-
else:
1095-
future = string[m.end():]
1096-
string = string[:m.start()] + g[0] + "sage:" + g[1] + future
1091+
string = string[:m.start()] + g[0] + "sage:" + g[1] + string[m.end():]
10971092
m = backslash_replacer.search(string, m.start())
10981093

10991094
replace_ellipsis = not python_prompt.search(string)

0 commit comments

Comments
 (0)