From 8498081907a1172f7e6bec016b8130ac4e80c2d6 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Tue, 16 Jun 2009 10:33:10 -0400 Subject: Fixed UnicodeDecodeErrors from some of the php & pl tests when normalizing whitespace with tidy. --- markdown/tests/__init__.py | 4 ++-- markdown/tests/pl/Tests_2004/test.cfg | 1 + 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 -- cgit v1.2.3