aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-01-13 18:50:34 +0000
committerMichael Williamson <mike@zwobble.org>2016-01-13 18:52:15 +0000
commitb6adea02532dbd359f89c1d2ed2ccd2219dfb56a (patch)
tree21ef4b00fe7ebd93bfe11e062d3158721a3a1010
parent8bc35186bff3b13853e3f43d1f19ebc1ac86aa06 (diff)
Improve support for lists made in LibreOffice
-rw-r--r--NEWS6
-rw-r--r--mammoth/options.py4
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 6d4c95e..dfc56e3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+# 0.3.28
+
+* Improve support for lists made in LibreOffice. Specifically, this changes the
+ default style mapping for paragraphs with a style of "Normal" to have the
+ lowest precedence.
+
# 0.3.27
* Handle XML where the child nodes of an element contains text nodes.
diff --git a/mammoth/options.py b/mammoth/options.py
index ca40f77..3bc6eb7 100644
--- a/mammoth/options.py
+++ b/mammoth/options.py
@@ -26,8 +26,6 @@ def _get_line(line):
_default_style_map_result = _read_style_map("""
-p[style-name='Normal'] => p:fresh
-
p.Heading1 => h1:fresh
p.Heading2 => h2:fresh
p.Heading3 => h3:fresh
@@ -67,6 +65,8 @@ p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh
p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh
r[style-name='Hyperlink'] =>
+
+p[style-name='Normal'] => p:fresh
""")