aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Org.hs
diff options
context:
space:
mode:
authorAner Lucero <4rgento@gmail.com>2021-06-09 10:53:35 -0300
committerJohn MacFarlane <jgm@berkeley.edu>2021-10-22 15:14:23 -0700
commit921af3085422ed5896db6996c54009cf2a61a517 (patch)
tree0c1e58837b5105e972ac3717a95c54df14b52a2e /src/Text/Pandoc/Writers/Org.hs
parenta9f4bff5e29ed15fb567f4d5f59b60ef3c71933f (diff)
downloadpandoc-921af3085422ed5896db6996c54009cf2a61a517.tar.gz
Use simpleFigure in Readers.
Diffstat (limited to 'src/Text/Pandoc/Writers/Org.hs')
-rw-r--r--src/Text/Pandoc/Writers/Org.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index f4a22695c..24e664ae4 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -105,9 +105,7 @@ blockToOrg :: PandocMonad m
blockToOrg Null = return empty
blockToOrg (Div attr bs) = divToOrg attr bs
blockToOrg (Plain inlines) = inlineListToOrg inlines
--- title beginning with fig: indicates that the image is a figure
-blockToOrg (Para [Image attr txt (src,tgt)])
- | Just tit <- T.stripPrefix "fig:" tgt = do
+blockToOrg (SimpleFigure attr txt (src, tit)) = do
capt <- if null txt
then return empty
else ("#+caption: " <>) `fmap` inlineListToOrg txt