git.iko.soy/typeable/pandoc
on master help sign in
HTML writer: Don't print `<dt>` unless term is non-empty.
commitbf77889e195121cec03490fc22f68975574abcad authorJohn MacFarlane <jgm@berkeley.edu> dateWed 12 Sep 2012, 17:44 (14 years ago) parentbbbbee0
1 file changed+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
src/Text/Pandoc/Writers/HTML.hs+3−1
@@ -482,7 +482,9 @@ blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do
482482 return $ foldl (!) (ordList opts contents) attribs
483483blockToHtml opts (DefinitionList lst) = do
484484 contents <- mapM (\(term, defs) ->
485− do term' <- liftM (H.dt) $ inlineListToHtml opts term
485+ do term' <- if null term
486+ then return mempty
487+ else liftM (H.dt) $ inlineListToHtml opts term
486488 defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) .
487489 blockListToHtml opts) defs
488490 return $ mconcat $ nl opts : term' : nl opts :