From aca046702e68c75551072a49a615d49cc5887eb3 Mon Sep 17 00:00:00 2001
From: fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
Date: Sun, 11 Mar 2007 07:54:47 +0000
Subject: [PATCH] Added support for DefinitionList blocks to HTML writer.
 Cleaned up bullet and ordered list code by using ordList and unordList
 instead of raw olist and ulist.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@571 788f1e2b-df1e-0410-8736-df70ead52e1b
---
 src/Text/Pandoc/Writers/HTML.hs | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index f4861fe0b..5f42679b4 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -163,12 +163,18 @@ blockToHtml opts (BulletList lst) =
   let attribs = if writerIncremental opts
                    then [theclass "incremental"]
                    else [] in
-  ulist ! attribs $ toHtmlFromList $ map (listItemToHtml opts) lst 
+  unordList ! attribs $ map (blockListToHtml opts) lst 
 blockToHtml opts (OrderedList lst) = 
   let attribs = if writerIncremental opts
                    then [theclass "incremental"]
                    else [] in
-  olist ! attribs $ toHtmlFromList $ map (listItemToHtml opts) lst 
+  ordList ! attribs $ map (blockListToHtml opts) lst 
+blockToHtml opts (DefinitionList lst) = 
+  let attribs = if writerIncremental opts
+                   then [theclass "incremental"]
+                   else [] in
+  defList ! attribs $ map (\(term, def) -> (inlineListToHtml opts term, 
+                          blockListToHtml opts def)) lst 
 blockToHtml opts HorizontalRule = hr
 blockToHtml opts (Header level lst) = 
   let contents = inlineListToHtml opts lst in
@@ -210,9 +216,9 @@ tableItemToHtml opts tag align' width item =
                  else [] in 
   tag ! attrib $ toHtmlFromList $ map (blockToHtml opts) item
 
-listItemToHtml :: WriterOptions -> [Block] -> Html
-listItemToHtml opts list = 
-  li $ toHtmlFromList $ map (blockToHtml opts) list
+blockListToHtml :: WriterOptions -> [Block] -> Html
+blockListToHtml opts list = 
+  toHtmlFromList $ map (blockToHtml opts) list
 
 -- | Convert list of Pandoc inline elements to HTML.
 inlineListToHtml :: WriterOptions -> [Inline] -> Html