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
This commit is contained in:
parent
44cec96e61
commit
aca046702e
1 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue