summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-04-13 01:33:10 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-04-13 01:33:10 +0000
commit944740ce5c0458d5e28ffbb737605f02d255df57 (patch)
tree46004de70334f72855cfced3c4c3527ce36866fe /src
parent92845a98344145c8a7753cdc4ef2c31e551659d4 (diff)
Added Table to prettyBlock in Shared.hs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@582 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Shared.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index afb75e4c5..e231163eb 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -205,6 +205,13 @@ prettyBlock (DefinitionList blockLists) = "DefinitionList\n" ++
indentBy 2 0 ("[ " ++ (joinWithSep ", "
(map (\(term, blocks) -> "(" ++ show term ++ ",\n" ++
indentBy 1 2 (prettyBlockList 2 blocks) ++ ")") blockLists))) ++ " ]"
+prettyBlock (Table caption aligns widths header rows) =
+ "Table " ++ show caption ++ " " ++ show aligns ++ " " ++
+ show widths ++ "\n" ++ prettyRow header ++ " [\n" ++
+ (joinWithSep ",\n" (map prettyRow rows)) ++ " ]"
+ where prettyRow cols = indentBy 2 0 ("[ " ++ (joinWithSep ", "
+ (map (\blocks -> prettyBlockList 2 blocks)
+ cols))) ++ " ]"
prettyBlock block = show block
-- | Prettyprint Pandoc document.