Skip to content

Commit ca0db0c

Browse files
committed
Use SimpleFigure in Textile writer.
1 parent 77cfe39 commit ca0db0c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Text/Pandoc/Writers/Textile.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.Textile
54
Copyright : Copyright (C) 2010-2021 John MacFarlane
@@ -111,8 +110,7 @@ blockToTextile opts (Div attr bs) = do
111110
blockToTextile opts (Plain inlines) =
112111
inlineListToTextile opts inlines
113112

114-
-- title beginning with fig: indicates that the image is a figure
115-
blockToTextile opts (Para [Image attr txt (src,T.stripPrefix "fig:" -> Just tit)]) = do
113+
blockToTextile opts (SimpleFigure attr txt (src, tit)) = do
116114
capt <- blockToTextile opts (Para txt)
117115
im <- inlineToTextile opts (Image attr txt (src,tit))
118116
return $ im <> "\n" <> capt

0 commit comments

Comments
 (0)