summaryrefslogtreecommitdiff
path: root/paste/debug/doctest_webapp.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:26:47 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:26:47 +0200
commit04ecd5542849191457ccfc3e42a39452db47825a (patch)
treeb0a470e46326b709d090a900847bbb004d355607 /paste/debug/doctest_webapp.py
parent4c177fce89fee925f0f4fbfde00ce2e1252562c0 (diff)
downloadpaste-04ecd5542849191457ccfc3e42a39452db47825a.tar.gz
Strip trailing spaces
Diffstat (limited to 'paste/debug/doctest_webapp.py')
-rwxr-xr-xpaste/debug/doctest_webapp.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/paste/debug/doctest_webapp.py b/paste/debug/doctest_webapp.py
index f399ac3..4b9f95a 100755
--- a/paste/debug/doctest_webapp.py
+++ b/paste/debug/doctest_webapp.py
@@ -214,7 +214,7 @@ def show_file(path, version, description=None, data=None):
data = f.read()
f.close()
if ext == '.py':
- html = ('<div class="source-code">%s</div>'
+ html = ('<div class="source-code">%s</div>'
% PySourceColor.str2html(data, PySourceColor.dark))
else:
html = '<pre class="source-code">%s</pre>' % cgi.escape(data, 1)
@@ -241,7 +241,7 @@ def write_data(path, data):
f = open(path, 'wb')
f.write(data)
f.close()
-
+
def change_file(path, changes):
f = open(os.path.abspath(path), 'rb')
@@ -282,7 +282,7 @@ class LongFormDocTestParser(doctest.DocTestParser):
(?![ ]*>>>) # Not a line starting with PS1
.*$\n? # But any other line
)*))
- |
+ |
(?: # This is for longer commands that are prefixed with a reST
# comment like '.. run:' (two colons makes that a directive).
# These commands cannot have any output.
@@ -331,7 +331,7 @@ class LongFormDocTestParser(doctest.DocTestParser):
# Get the example's indentation level.
runner = m.group('run') or ''
indent = len(m.group('%sindent' % runner))
-
+
# Divide source into lines; check that they're properly
# indented; and then strip their indentation & prompts.
source_lines = m.group('%ssource' % runner).split('\n')