Improved prettyprinting of definition lists.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@596 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-05-10 18:50:12 +00:00
parent 5454c841a9
commit f9731108e8

View file

@ -217,9 +217,9 @@ prettyBlock (BulletList blockLists) = "BulletList\n" ++
indentBy 2 0 ("[ " ++ (joinWithSep ", " indentBy 2 0 ("[ " ++ (joinWithSep ", "
(map (\blocks -> prettyBlockList 2 blocks) blockLists))) ++ " ]" (map (\blocks -> prettyBlockList 2 blocks) blockLists))) ++ " ]"
prettyBlock (DefinitionList blockLists) = "DefinitionList\n" ++ prettyBlock (DefinitionList blockLists) = "DefinitionList\n" ++
indentBy 2 0 ("[ " ++ (joinWithSep ", " indentBy 2 0 ("[" ++ (joinWithSep ",\n"
(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) = prettyBlock (Table caption aligns widths header rows) =
"Table " ++ show caption ++ " " ++ show aligns ++ " " ++ "Table " ++ show caption ++ " " ++ show aligns ++ " " ++
show widths ++ "\n" ++ prettyRow header ++ " [\n" ++ show widths ++ "\n" ++ prettyRow header ++ " [\n" ++