diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-20 20:48:06 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-20 20:48:06 -0800 |
commit | 8011d079c8d20c118212be558ef83a43c66cfff3 (patch) | |
tree | ca366a968ae589a75b937c7b2e116d1ed5c097f5 /src/Text | |
parent | 6b50778b2a8b8f4784558916b8eeffc671dc3440 (diff) | |
download | pandoc-8011d079c8d20c118212be558ef83a43c66cfff3.tar.gz |
Native writer: eliminated empty spaces in brackets.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Native.hs | 5 |
1 files changed, 3 insertions, 2 deletions
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 |