aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2009-06-16 10:33:10 -0400
committerWaylan Limberg <waylan@gmail.com>2009-06-16 10:33:10 -0400
commit8498081907a1172f7e6bec016b8130ac4e80c2d6 (patch)
treef794005d745a4b5933f88cd8c098781446c5efad
parent831781c293a853d41307b4cff54c7deb4906d086 (diff)
downloadmarkdown-8498081907a1172f7e6bec016b8130ac4e80c2d6.tar.gz
markdown-8498081907a1172f7e6bec016b8130ac4e80c2d6.tar.bz2
markdown-8498081907a1172f7e6bec016b8130ac4e80c2d6.zip
Fixed UnicodeDecodeErrors from some of the php & pl tests when normalizing whitespace with tidy.
-rw-r--r--markdown/tests/__init__.py4
-rw-r--r--markdown/tests/pl/Tests_2004/test.cfg1
2 files changed, 3 insertions, 2 deletions
diff --git a/markdown/tests/__init__.py b/markdown/tests/__init__.py
index ff4916a..d07ae7d 100644
--- a/markdown/tests/__init__.py
+++ b/markdown/tests/__init__.py
@@ -44,7 +44,7 @@ def get_args(file, config):
def normalize(text):
""" Normalize whitespace for a string of html using tidy. """
- return unicode(tidy.parseString(text.encode('utf-8'),
+ return str(tidy.parseString(text.encode('utf-8'),
drop_empty_paras=0,
fix_backslash=0,
fix_bad_comments=0,
@@ -56,7 +56,7 @@ def normalize(text):
quote_ampersand=0,
show_body_only=1,
char_encoding='utf8',
- newline='LF'))
+ newline='LF')).decode('string-escape')
class CheckSyntax(object):
def __init__(self, description=None):
diff --git a/markdown/tests/pl/Tests_2004/test.cfg b/markdown/tests/pl/Tests_2004/test.cfg
index 12f3b4c..d3850f4 100644
--- a/markdown/tests/pl/Tests_2004/test.cfg
+++ b/markdown/tests/pl/Tests_2004/test.cfg
@@ -5,5 +5,6 @@ normalize=1
#skip=1
[Yuri-Footnotes]
+extensions=footnotes
skip=1