git.iko.soy/typeable/pandoc
on master help sign in
FB2 writer: properly handle cover-image containing spaces.

Closes #6391.

commit4b5d2aa48505c255b8e3bada1c1a76ab3b638ce8 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 21 May 2020, 14:08 (6 years ago) parent7902ac5
1 file changed+2−2
src/Text/Pandoc/Writers/FB2.hs+2−2
src/Text/Pandoc/Writers/FB2.hs+2−2
@@ -40,7 +40,7 @@ import Text.Pandoc.Definition
4040import Text.Pandoc.Logging
4141import Text.Pandoc.Options (HTMLMathMethod (..), WriterOptions (..), def)
4242import Text.Pandoc.Shared (capitalize, isURI, orderedListMarkers,
43− makeSections, tshow)
43+ makeSections, tshow, stringify)
4444import Text.Pandoc.Writers.Shared (lookupMetaString, toLegacyTable)
4545
4646-- | Data to be written at the end of the document:
@@ -116,7 +116,7 @@ description meta' = do
116116 im <- insertImage InlineImage img
117117 return [el "coverpage" im]
118118 coverpage <- case lookupMeta "cover-image" meta' of
119− Just (MetaInlines [Str s]) -> coverimage s
119+ Just (MetaInlines ils) -> coverimage (stringify ils)
120120 Just (MetaString s) -> coverimage s
121121 _ -> return []
122122 return $ el "description"