aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Kondratskiy <kholdstare0.0@gmail.com>2013-07-14 14:33:58 -0400
committerAlexander Kondratskiy <kholdstare0.0@gmail.com>2013-07-14 14:33:58 -0400
commit0b49f810f401b9154b50727d2179d1ec39cd8d3e (patch)
treeb76b6f125146453407807ab036f0f06cc8e28738 /src
parent15984adaaa1eea73b268c669a2508635d07b56b1 (diff)
downloadpandoc-0b49f810f401b9154b50727d2179d1ec39cd8d3e.tar.gz
Fixing wrong numbered-list indentation in open document format
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/OpenDocument.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
index 30f99c3e4..0efbf7580 100644
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -489,14 +489,16 @@ paraStyle parent attrs = do
tight = if t then [ ("fo:margin-top" , "0in" )
, ("fo:margin-bottom" , "0in" )]
else []
- indent = when (i /= 0 || b || t) $
- selfClosingTag "style:paragraph-properties" $
- [ ("fo:margin-left" , indentVal)
+ indent = if (i /= 0 || b)
+ then [ ("fo:margin-left" , indentVal)
, ("fo:margin-right" , "0in" )
, ("fo:text-indent" , "0in" )
, ("style:auto-text-indent" , "false" )]
- ++ tight
- addParaStyle $ inTags True "style:style" (styleAttr ++ attrs) indent
+ else []
+ attributes = indent ++ tight
+ paraProps = when (not $ null attributes) $
+ selfClosingTag "style:paragraph-properties" attributes
+ addParaStyle $ inTags True "style:style" (styleAttr ++ attrs) paraProps
return pn
paraListStyle :: Int -> State WriterState Int