Added Table to prettyBlock in Shared.hs.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@582 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-04-13 01:33:10 +00:00
parent 92845a9834
commit 944740ce5c

View file

@ -205,6 +205,13 @@ prettyBlock (DefinitionList blockLists) = "DefinitionList\n" ++
indentBy 2 0 ("[ " ++ (joinWithSep ", " indentBy 2 0 ("[ " ++ (joinWithSep ", "
(map (\(term, blocks) -> "(" ++ show term ++ ",\n" ++ (map (\(term, blocks) -> "(" ++ show term ++ ",\n" ++
indentBy 1 2 (prettyBlockList 2 blocks) ++ ")") blockLists))) ++ " ]" 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 prettyBlock block = show block
-- | Prettyprint Pandoc document. -- | Prettyprint Pandoc document.