diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-11-26 22:03:57 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-11-26 22:03:57 +0100 |
commit | 7b4a12a532d02d9ea0069d73f118537f045bd42f (patch) | |
tree | 2022788a31db2f1b15734ee7837b9b4398c6a1e6 /src/Text/Pandoc | |
parent | fee0b913c5dd95e50845f6f35430b7582322ef0b (diff) | |
download | pandoc-7b4a12a532d02d9ea0069d73f118537f045bd42f.tar.gz |
Revert "Open Document writer: set first level of blockquotes to not use indent (#2757)"
This reverts commit fee0b913c5dd95e50845f6f35430b7582322ef0b.
The previous commit did not provide a good way to get increased
indentation for nested block quotes.
Rolling it back for now. @jjsheets feel free to submit something
that handles multiple levels of block quote smoothly, if you like.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/OpenDocument.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index 2395d5fbf..8bd0f469e 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -107,7 +107,7 @@ increaseIndent :: State WriterState () increaseIndent = modify $ \s -> s { stIndentPara = 1 + stIndentPara s } resetIndent :: State WriterState () -resetIndent = modify $ \s -> s { stIndentPara = max (stIndentPara s - 1) 0 } +resetIndent = modify $ \s -> s { stIndentPara = (stIndentPara s) - 1 } inTightList :: State WriterState a -> State WriterState a inTightList f = modify (\s -> s { stTight = True }) >> f >>= \r -> @@ -315,7 +315,8 @@ blockToOpenDocument o bs setInDefinitionList False return r preformatted s = (flush . vcat) <$> mapM (inPreformattedTags . escapeStringForXML) (lines s) - mkBlockQuote b = do i <- paraStyle "Quotations" [] + mkBlockQuote b = do increaseIndent + i <- paraStyle "Quotations" [] inBlockQuote o i (map plainToPara b) orderedList a b = do (ln,pn) <- newOrderedListStyle (isTightList b) a inTags True "text:list" [ ("text:style-name", "L" ++ show ln)] |