@@ -379,13 +379,17 @@ blockToHtml _ Null = return mempty
379blockToHtml opts (Plain lst) = inlineListToHtml opts lst
379blockToHtml opts (Plain lst) = inlineListToHtml opts lst
380blockToHtml opts (Para [Image txt (s,tit)]) = do
380blockToHtml opts (Para [Image txt (s,tit)]) = do
381 img <- inlineToHtml opts (Image txt (s,tit))
381 img <- inlineToHtml opts (Image txt (s,tit))
382+ let tocapt = if writerHtml5 opts
384+ else H.p ! A.class_ "caption"
382− capt <- inlineListToHtml opts txt
387+ else tocapt `fmap` inlineListToHtml opts txt
383 return $ if writerHtml5 opts
388 return $ if writerHtml5 opts
384 then H5.figure $ mconcat
389 then H5.figure $ mconcat
385− [nl opts, img, H5.figcaption capt, nl opts]
390+ [nl opts, img, capt, nl opts]
386 else H.div ! A.class_ "figure" $ mconcat
391 else H.div ! A.class_ "figure" $ mconcat
387− [nl opts, img, H.p ! A.class_ "caption" $ capt,
392+ [nl opts, img, capt, nl opts]
389blockToHtml opts (Para lst) = do
393blockToHtml opts (Para lst) = do
390 contents <- inlineListToHtml opts lst
394 contents <- inlineListToHtml opts lst
391 return $ H.p contents
395 return $ H.p contents