git.iko.soy/typeable/pandoc
on master help sign in
Added Table to prettyBlock in Shared.hs.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@582 788f1e2b-df1e-0410-8736-df70ead52e1b

commit944740ce5c0458d5e28ffbb737605f02d255df57 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 13 Apr 2007, 01:33 (20 years ago) parent92845a9
1 file changed+7
src/Text/Pandoc/Shared.hs+7
src/Text/Pandoc/Shared.hs+7
@@ -205,6 +205,13 @@ prettyBlock (DefinitionList blockLists) = "DefinitionList\n" ++
205205 indentBy 2 0 ("[ " ++ (joinWithSep ", "
206206 (map (\(term, blocks) -> "(" ++ show term ++ ",\n" ++
207207 indentBy 1 2 (prettyBlockList 2 blocks) ++ ")") blockLists))) ++ " ]"
208+prettyBlock (Table caption aligns widths header rows) =
209+ "Table " ++ show caption ++ " " ++ show aligns ++ " " ++
210+ show widths ++ "\n" ++ prettyRow header ++ " [\n" ++
211+ (joinWithSep ",\n" (map prettyRow rows)) ++ " ]"
212+ where prettyRow cols = indentBy 2 0 ("[ " ++ (joinWithSep ", "
213+ (map (\blocks -> prettyBlockList 2 blocks)
214+ cols))) ++ " ]"
208215prettyBlock block = show block
209216
210217-- | Prettyprint Pandoc document.