From 944740ce5c0458d5e28ffbb737605f02d255df57 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 13 Apr 2007 01:33:10 +0000 Subject: Added Table to prettyBlock in Shared.hs. git-svn-id: https://pandoc.googlecode.com/svn/trunk@582 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Shared.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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. -- cgit v1.2.3