Skip to content

Commit 33fa95f

Browse files
committed
Use SimpleFigure in ZimWiki writer.
1 parent ca0db0c commit 33fa95f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Text/Pandoc/Writers/ZimWiki.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{-# LANGUAGE OverloadedStrings #-}
2-
{-# LANGUAGE ViewPatterns #-}
32
{- |
43
Module : Text.Pandoc.Writers.ZimWiki
54
Copyright : © 2008-2021 John MacFarlane,
@@ -86,9 +85,8 @@ blockToZimWiki opts (Div _attrs bs) = do
8685

8786
blockToZimWiki opts (Plain inlines) = inlineListToZimWiki opts inlines
8887

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

0 commit comments

Comments
 (0)