git.iko.soy/typeable/pandoc
on master help sign in
Open Document writer: set first level of blockquotes to not use indent (#2757)
fee0b91Jeff Sheets
src/Text/Pandoc/Writers/OpenDocument.hs+2−3
@@ -107,7 +107,7 @@ increaseIndent :: State WriterState ()
107increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s }
107increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s }
108
108
109resetIndent :: State WriterState ()
109resetIndent :: State WriterState ()
110−resetIndent = modify $ \s -> s { stIndentPara = (stIndentPara s) - 1 }
110+resetIndent = modify $ \s -> s { stIndentPara = max (stIndentPara s - 1) 0 }
111
111
112inTightList :: State WriterState a -> State WriterState a
112inTightList :: State WriterState a -> State WriterState a
113inTightList f = modify (\s -> s { stTight = True }) >> f >>= \r ->
113inTightList f = modify (\s -> s { stTight = True }) >> f >>= \r ->
@@ -315,8 +315,7 @@ blockToOpenDocument o bs
315 setInDefinitionList False
315 setInDefinitionList False
316 return r
316 return r
317 preformatted s = (flush . vcat) <$> mapM (inPreformattedTags . escapeStringForXML) (lines s)
317 preformatted s = (flush . vcat) <$> mapM (inPreformattedTags . escapeStringForXML) (lines s)
318− mkBlockQuote b = do increaseIndent
319− i <- paraStyle "Quotations" []
318+ mkBlockQuote b = do i <- paraStyle "Quotations" []
320 inBlockQuote o i (map plainToPara b)
319 inBlockQuote o i (map plainToPara b)
321 orderedList a b = do (ln,pn) <- newOrderedListStyle (isTightList b) a
320 orderedList a b = do (ln,pn) <- newOrderedListStyle (isTightList b) a
322 inTags True "text:list" [ ("text:style-name", "L" ++ show ln)]
321 inTags True "text:list" [ ("text:style-name", "L" ++ show ln)]