Skip to content

Commit

Permalink
Use SimpleFigure in ZimWiki writer.
Browse files Browse the repository at this point in the history
  • Loading branch information
argent0 committed Jun 22, 2021
1 parent 4421c88 commit 56a671a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Text/Pandoc/Writers/ZimWiki.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ blockToZimWiki opts (Div _attrs bs) = do

blockToZimWiki opts (Plain inlines) = inlineListToZimWiki opts inlines

-- title beginning with fig: indicates that the image is a figure
-- ZimWiki doesn't support captions - so combine together alt and caption into alt
blockToZimWiki opts (Para [Image attr txt (src,T.stripPrefix "fig:" -> Just tit)]) = do
blockToZimWiki opts (SimpleFigure attr txt src tit) = do
capt <- if null txt
then return ""
else (" " <>) `fmap` inlineListToZimWiki opts txt
Expand Down

0 comments on commit 56a671a

Please sign in to comment.