From 9cadf5362190d79b85ee29530ccdcc6dfa3e21e2 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Mon, 10 Sep 2007 23:44:21 +0000 Subject: + Fixed bug in RST writer's handling of ordered lists. Previously, list items with multiple lines would not always line up with single-line list items. Now, list items are nested the length of the list marker + 1. This looks better and ensures that list items all line up. (Note that list markers are padded to the length of the longest list marker in the series.) + Use 3-space indent for unordered lists. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1013 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/RST.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index 434cd1cf7..e2b55daa0 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -225,7 +225,7 @@ blockToRST opts (DefinitionList items) = do bulletListItemToRST :: WriterOptions -> [Block] -> State WriterState Doc bulletListItemToRST opts items = do contents <- blockListToRST opts items - return $ hang (text "- ") (writerTabStop opts) contents + return $ hang (text "- ") 3 contents -- | Convert ordered list item (a list of blocks) to RST. orderedListItemToRST :: WriterOptions -- ^ options @@ -234,7 +234,7 @@ orderedListItemToRST :: WriterOptions -- ^ options -> State WriterState Doc orderedListItemToRST opts marker items = do contents <- blockListToRST opts items - return $ hang (text marker) (writerTabStop opts) contents + return $ hang (text marker) (length marker + 1) contents -- | Convert defintion list item (label, list of blocks) to RST. definitionListItemToRST :: WriterOptions -> ([Inline], [Block]) -> State WriterState Doc -- cgit v1.2.3