git.iko.soy/typeable/pandoc
on master help sign in
FB2 writer: properly handle cover-image containing spaces.
4b5d2aaJohn MacFarlane
src/Text/Pandoc/Writers/FB2.hs+2−2
@@ -40,7 +40,7 @@ import Text.Pandoc.Definition
40import Text.Pandoc.Logging
40import Text.Pandoc.Logging
41import Text.Pandoc.Options (HTMLMathMethod (..), WriterOptions (..), def)
41import Text.Pandoc.Options (HTMLMathMethod (..), WriterOptions (..), def)
42import Text.Pandoc.Shared (capitalize, isURI, orderedListMarkers,
42import Text.Pandoc.Shared (capitalize, isURI, orderedListMarkers,
43− makeSections, tshow)
43+ makeSections, tshow, stringify)
44import Text.Pandoc.Writers.Shared (lookupMetaString, toLegacyTable)
44import Text.Pandoc.Writers.Shared (lookupMetaString, toLegacyTable)
45
45
46-- | Data to be written at the end of the document:
46-- | Data to be written at the end of the document:
@@ -116,7 +116,7 @@ description meta' = do
116 im <- insertImage InlineImage img
116 im <- insertImage InlineImage img
117 return [el "coverpage" im]
117 return [el "coverpage" im]
118 coverpage <- case lookupMeta "cover-image" meta' of
118 coverpage <- case lookupMeta "cover-image" meta' of
119− Just (MetaInlines [Str s]) -> coverimage s
119+ Just (MetaInlines ils) -> coverimage (stringify ils)
120 Just (MetaString s) -> coverimage s
120 Just (MetaString s) -> coverimage s
121 _ -> return []
121 _ -> return []
122 return $ el "description"
122 return $ el "description"