Skip to content

Commit

Permalink
HTML writer: don't process pars with empty RawInline, fixes #1040 (#3327
Browse files Browse the repository at this point in the history
)
  • Loading branch information
mb21 authored and jgm committed Dec 24, 2016
1 parent 8f09a2b commit 9b29a55
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Text/Pandoc/Writers/HTML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -451,9 +451,14 @@ blockToHtml opts (Para [Image attr txt (s,'f':'i':'g':':':tit)]) = do
[nl opts, img, capt, nl opts]
else H.div ! A.class_ "figure" $ mconcat
[nl opts, img, nl opts, capt, nl opts]
blockToHtml opts (Para lst) = do
contents <- inlineListToHtml opts lst
return $ H.p contents
blockToHtml opts (Para lst)
| isEmptyRaw lst = return mempty
| otherwise = do
contents <- inlineListToHtml opts lst
return $ H.p contents
where
isEmptyRaw [RawInline f _] = f /= (Format "html")
isEmptyRaw _ = False
blockToHtml opts (LineBlock lns) =
if writerWrapText opts == WrapNone
then blockToHtml opts $ linesToPara lns
Expand Down

0 comments on commit 9b29a55

Please sign in to comment.