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:
parent
92845a9834
commit
944740ce5c
1 changed files with 7 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue