summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/normalize.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/normalize.py b/test/normalize.py
index 03d958e..70bee46 100644
--- a/test/normalize.py
+++ b/test/normalize.py
@@ -21,7 +21,8 @@ class MyHTMLParser(HTMLParser):
after_block_tag = after_tag and self.is_block_tag(self.last_tag)
if after_tag and self.last_tag == "br":
data = data.lstrip('\n')
- data = whitespace_re.sub(' ', data)
+ if not self.in_pre:
+ data = whitespace_re.sub(' ', data)
if after_block_tag and not self.in_pre:
if self.last == "starttag":
data = data.lstrip()