diff --git a/Text/Pandoc/Writers/OpenDocument.hs b/Text/Pandoc/Writers/OpenDocument.hs
index a49bed49f..52438f81e 100644
--- a/Text/Pandoc/Writers/OpenDocument.hs
+++ b/Text/Pandoc/Writers/OpenDocument.hs
@@ -298,7 +298,7 @@ blockToOpenDocument o bs
| OrderedList a b <- bs = orderedList a b
| Table c a w h r <- bs = table c a w h r
| Null <- bs = return empty
- | HorizontalRule <- bs = return empty
+ | HorizontalRule <- bs = return $ selfClosingTag "text:p" [ ("text:style-name", "Horizontal_20_Line") ]
| otherwise = return empty
where
defList b = do setInDefinitionList True
diff --git a/changelog b/changelog
index d448f1c17..4fc629db6 100644
--- a/changelog
+++ b/changelog
@@ -62,6 +62,9 @@ pandoc (1.1)
This prevents parts of the document that are not math from being
interpreted as math by LaTeXMathML.js.
+ * OpenDocument and ODT writers: Added support for HorizontalRule elements,
+ which were formerly ignored. Resolves Issue #95.
+
* Text.Pandoc.Shared: Modified wrappedTeX to eliminate the line break
between a footnote and immediately following nonspace characters in
LaTeX and ConTeXt output. (This gets interpreted as a space, which
diff --git a/data/odt-styles/styles.xml b/data/odt-styles/styles.xml
index 446f4cdea..df9a15634 100644
--- a/data/odt-styles/styles.xml
+++ b/data/odt-styles/styles.xml
@@ -1,2 +1,2 @@
-1
\ No newline at end of file
+1
\ No newline at end of file
diff --git a/tests/writer.opendocument b/tests/writer.opendocument
index a94b1176a..587f9efe0 100644
--- a/tests/writer.opendocument
+++ b/tests/writer.opendocument
@@ -875,6 +875,7 @@
This is a set of tests for
pandoc. Most of them are adapted from John
Gruber’s markdown test suite.
+
Headers
Level
2 with an
@@ -897,6 +898,7 @@
Level
2
with no blank line
+
Paragraphs
Here’s a regular
paragraph.
@@ -908,6 +910,7 @@
bullet. * criminey.
There should be a hard line
breakhere.
+
Block
Quotes
E-mail style:
@@ -932,6 +935,7 @@
quote: 2 > 1.
And a following
paragraph.
+
Code
Blocks
Code:
@@ -946,6 +950,7 @@
this code block is indented by two tabs
These should not be escaped: \$ \\ \> \[ \{
+
Lists
Unordered
Asterisks tight:
@@ -1231,6 +1236,7 @@
item:
M.A. 2007
B. Williams
+
Definition
Lists
Tight using spaces:
@@ -1300,6 +1306,7 @@
Code:
<hr />
Hr’s:
+
Inline
Markup
This is
@@ -1338,6 +1345,7 @@
These should not be
superscripts or subscripts, because of the unescaped
spaces: a^b c^d, a~b c~d.
+
Smart
quotes, ellipses,
dashes
@@ -1361,6 +1369,7 @@
Dashes between numbers:
5–7, 255–66, 1987–1999.
Ellipses…and…and….
+
LaTeX
@@ -1411,6 +1420,7 @@ Animal & Number \\ \hline
Dog & 2 \\
Cat & 1 \\ \hline
\end{tabular}
+
Special
Characters
Here is some
@@ -1455,6 +1465,7 @@ Cat & 1 \\ \hline
Bang: !
Plus: +
Minus: -
+
Links
Explicit
Just a
@@ -1523,6 +1534,7 @@ Cat & 1 \\ \hline
here:
<http://example.com/>
or here: <http://example.com/>
+
Images
From
“Voyage dans la Lune” by Georges Melies
@@ -1531,6 +1543,7 @@ Cat & 1 \\ \hline
Here is a movie
icon.
+
Footnotes
Here is a footnote
reference,1