From c89c1263798eaedffa09077819e769b019801556 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Wed, 28 Jan 2009 13:44:39 -0500 Subject: Added optional HTML 4 output. Available formats currently include XHTML 1 and HTML 4. Thanks to Eric Abrahamsen for doing the legwork and providing an initial working patch. And thanks to Fredrik Lundh for allowing us to include his html4 serializer from the ElementTree 1.3 preview. --- test-markdown.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test-markdown.py') diff --git a/test-markdown.py b/test-markdown.py index f3be36e..95914c4 100755 --- a/test-markdown.py +++ b/test-markdown.py @@ -160,7 +160,7 @@ class TestRunner : if not os.path.exists(TMP_DIR): os.mkdir(TMP_DIR) - def test_directory(self, dir, measure_time=False, safe_mode=False, encoding = "utf8") : + def test_directory(self, dir, measure_time=False, safe_mode=False, encoding="utf8", output_format='xhtml1') : self.encoding = encoding benchmark_file_name = os.path.join(dir, "benchmark.dat") self.saved_benchmarks = {} @@ -187,7 +187,7 @@ class TestRunner : mem = memory() start = time.clock() - self.md = markdown.Markdown(extensions=extensions, safe_mode = safe_mode) + self.md = markdown.Markdown(extensions=extensions, safe_mode = safe_mode, output_format=output_format) construction_time = time.clock() - start construction_mem = memory(mem) @@ -228,7 +228,7 @@ class TestRunner : #################### - def run_test(self, dir, test, repeat) : + def run_test(self, dir, test, repeat): print "--- %s ---" % test self.html_diff_file.write("%s" % test) @@ -324,6 +324,7 @@ def run_tests() : tester.test_directory("tests/extensions-x-toc") tester.test_directory("tests/extensions-x-def_list") tester.test_directory("tests/extensions-x-abbr") + tester.test_directory("tests/html4", output_format='html4') try: import pygments -- cgit v1.2.3