summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mammoth/__init__.py5
-rw-r--r--tests/xmlparser_tests.py6
2 files changed, 11 insertions, 0 deletions
diff --git a/mammoth/__init__.py b/mammoth/__init__.py
index e69de29..803273f 100644
--- a/mammoth/__init__.py
+++ b/mammoth/__init__.py
@@ -0,0 +1,5 @@
+from .results import Result
+
+
+def convert_to_html(fileobj):
+ return Result("", [])
diff --git a/tests/xmlparser_tests.py b/tests/xmlparser_tests.py
index 90d8d9b..33563dd 100644
--- a/tests/xmlparser_tests.py
+++ b/tests/xmlparser_tests.py
@@ -59,5 +59,11 @@ def namespace_of_attributes_is_mapped_to_prefix():
assert_equal("Hello!", xml.attributes["x:val"])
+@istest
+def whitespace_between_xml_declaration_and_root_tag_is_ignored():
+ xml = _parse_xml_string(b'<?xml version="1.0" ?>\n<body/>')
+ assert_equal("body", xml.name)
+
+
def _parse_xml_string(string, namespace_mapping=None):
return parse_xml(io.BytesIO(string), namespace_mapping)