git.iko.soy/typeable/pandoc
on master help sign in
Open Document writer: set first level of blockquotes to not use indent (#2757)

* Open Document writer: set first level of blockquotes to not use indent Nested blockquotes start using indents like before. Quotation style is still in use, so the style's indent settings take effect on the first level of blockquotes. * Removed list construction to improve pull request to fix #2747

commitfee0b913c5dd95e50845f6f35430b7582322ef0b authorJeff Sheets <jjsheets@users.noreply.github.com> dateSat 26 Nov 2016, 14:50 (10 years ago) parent5219599
1 file changed+2−3
src/Text/Pandoc/Writers/OpenDocument.hs+2−3
src/Text/Pandoc/Writers/OpenDocument.hs+2−3
@@ -107,7 +107,7 @@ increaseIndent :: State WriterState ()
107107increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s }
108108
109109resetIndent :: State WriterState ()
110−resetIndent = modify $ \s -> s { stIndentPara = (stIndentPara s) - 1 }
110+resetIndent = modify $ \s -> s { stIndentPara = max (stIndentPara s - 1) 0 }
111111
112112inTightList :: State WriterState a -> State WriterState a
113113inTightList f = modify (\s -> s { stTight = True }) >> f >>= \r ->
@@ -315,8 +315,7 @@ blockToOpenDocument o bs
315315 setInDefinitionList False
316316 return r
317317 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" []
320319 inBlockQuote o i (map plainToPara b)
321320 orderedList a b = do (ln,pn) <- newOrderedListStyle (isTightList b) a
322321 inTags True "text:list" [ ("text:style-name", "L" ++ show ln)]