From 8011d079c8d20c118212be558ef83a43c66cfff3 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 20 Jan 2011 20:48:06 -0800 Subject: Native writer: eliminated empty spaces in brackets. --- src/Text/Pandoc/Writers/Native.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Native.hs b/src/Text/Pandoc/Writers/Native.hs index 1ca38594b..5f8d3e0fd 100644 --- a/src/Text/Pandoc/Writers/Native.hs +++ b/src/Text/Pandoc/Writers/Native.hs @@ -37,7 +37,7 @@ import Text.Pandoc.Pretty prettyList :: [Doc] -> Doc prettyList ds = - "[ " <> (cat $ intersperse (cr <> ", ") $ map (nest 2) ds) <> " ]" + "[" <> (cat $ intersperse (cr <> ",") $ map (nest 1) ds) <> "]" -- | Prettyprint Pandoc block element. prettyBlock :: Block -> Doc @@ -55,7 +55,8 @@ prettyBlock (DefinitionList items) = "DefinitionList" $$ nest 1 (prettyList $ map (prettyList . map prettyBlock) defs) <> ")" prettyBlock (Table caption aligns widths header rows) = "Table " <> text (show caption) <> " " <> text (show aligns) <> " " <> - text (show widths) $$ nest 2 (prettyRow header) <> + text (show widths) $$ + prettyRow header $$ prettyList (map prettyRow rows) where prettyRow cols = prettyList (map (prettyList . map prettyBlock) cols) prettyBlock block = text $ show block -- cgit v1.2.3