File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,12 @@ para = do
201201 contents <- trimInlines . mconcat <$> many1 inline
202202 if F. all (== Space ) contents
203203 then return mempty
204- else return $ B. para contents
204+ else case B. toList contents of
205+ -- For the MediaWiki format all images are considered figures
206+ [Image attr figureCaption (src, title)] ->
207+ return $ B. simpleFigureWith
208+ attr (B. fromList figureCaption) src title
209+ _ -> return $ B. para contents
205210
206211table :: PandocMonad m => MWParser m Blocks
207212table = do
@@ -631,7 +636,7 @@ image = try $ do
631636 let attr = (" " , [] , kvs)
632637 caption <- (B. str fname <$ sym " ]]" )
633638 <|> try (char ' |' *> (mconcat <$> manyTill inline (sym " ]]" )))
634- return $ B. imageWith attr fname (" fig: " <> stringify caption) caption
639+ return $ B. imageWith attr fname (stringify caption) caption
635640
636641imageOption :: PandocMonad m => MWParser m Text
637642imageOption = try $ char ' |' *> opt
You can’t perform that action at this time.
0 commit comments