Skip to content

Commit

Permalink
Use SimpleFigure in Textile writer.
Browse files Browse the repository at this point in the history
  • Loading branch information
argent0 committed Jun 29, 2021
1 parent e074baf commit 615a063
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Text/Pandoc/Writers/Textile.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.Textile
Copyright : Copyright (C) 2010-2021 John MacFarlane
Expand Down Expand Up @@ -111,8 +110,7 @@ blockToTextile opts (Div attr bs) = do
blockToTextile opts (Plain inlines) =
inlineListToTextile opts inlines

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

0 comments on commit 615a063

Please sign in to comment.