aboutsummaryrefslogtreecommitdiff
path: root/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-07-10 23:26:12 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-07-10 23:26:12 +0000
commit2df112bdf681ca5831c1d3137c2788e68d33ef43 (patch)
tree60a852e0df4aba100e378a0d43d0474ba7aecebc /Text/Pandoc/Writers
parente0d229d9ce4cd79eb7531681e8ded02dd7165de8 (diff)
downloadpandoc-2df112bdf681ca5831c1d3137c2788e68d33ef43.tar.gz
Changed inDefinition and indentPara to stInDefinition and stIndentPara
(for consistency). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1295 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Writers')
-rw-r--r--Text/Pandoc/Writers/OpenDocument.hs34
1 files changed, 17 insertions, 17 deletions
diff --git a/Text/Pandoc/Writers/OpenDocument.hs b/Text/Pandoc/Writers/OpenDocument.hs
index 1197c24a0..7348f0a51 100644
--- a/Text/Pandoc/Writers/OpenDocument.hs
+++ b/Text/Pandoc/Writers/OpenDocument.hs
@@ -51,22 +51,22 @@ plainToPara x = x
--
data WriterState =
- WriterState { stNotes :: [Doc]
- , stTableStyles :: [Doc]
- , stParaStyles :: [Doc]
- , stListStyles :: [(Int, [Doc])]
- , indentPara :: Int
- , inDefinition :: Bool
+ WriterState { stNotes :: [Doc]
+ , stTableStyles :: [Doc]
+ , stParaStyles :: [Doc]
+ , stListStyles :: [(Int, [Doc])]
+ , stIndentPara :: Int
+ , stInDefinition :: Bool
}
defaultWriterState :: WriterState
defaultWriterState =
- WriterState { stNotes = []
- , stTableStyles = []
- , stParaStyles = []
- , stListStyles = []
- , indentPara = 0
- , inDefinition = False
+ WriterState { stNotes = []
+ , stTableStyles = []
+ , stParaStyles = []
+ , stListStyles = []
+ , stIndentPara = 0
+ , stInDefinition = False
}
when :: Bool -> Doc -> Doc
@@ -82,13 +82,13 @@ addParaStyle :: Doc -> State WriterState ()
addParaStyle i = modify $ \s -> s { stParaStyles = i : stParaStyles s }
increaseIndent :: State WriterState ()
-increaseIndent = modify $ \s -> s { indentPara = 1 + indentPara s }
+increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s }
resetIndent :: State WriterState ()
-resetIndent = modify $ \s -> s { indentPara = 0 }
+resetIndent = modify $ \s -> s { stIndentPara = 0 }
setInDefinitionList :: Bool -> State WriterState ()
-setInDefinitionList b = modify $ \s -> s { inDefinition = b }
+setInDefinitionList b = modify $ \s -> s { stInDefinition = b }
inParagraphTags :: Doc -> Doc
inParagraphTags = inTags False "text:p" [("text:style-name", "Text_20_body")]
@@ -428,8 +428,8 @@ tableStyle num wcs =
paraStyle :: String -> [(String,String)] -> State WriterState Int
paraStyle parent attrs = do
pn <- (+) 1 . length <$> gets stParaStyles
- i <- (*) 0.5 . fromIntegral <$> gets indentPara :: State WriterState Double
- b <- gets inDefinition
+ i <- (*) 0.5 . fromIntegral <$> gets stIndentPara :: State WriterState Double
+ b <- gets stInDefinition
let styleAttr = [ ("style:name" , "P" ++ show pn)
, ("style:family" , "paragraph" )
, ("style:parent-style-name", parent )]