"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Text/Pandoc/Class/IO.hs" between
pandoc-2.14.0.3.tar.gz and pandoc-2.14.1.tar.gz

About: Pandoc converts files from one markup format into another.

IO.hs  (pandoc-2.14.0.3):IO.hs  (pandoc-2.14.1)
skipping to change at line 229 skipping to change at line 229
logIOError $ BL.writeFile fullpath bs logIOError $ BL.writeFile fullpath bs
-- | If the given Inline element is an image with a @src@ path equal to -- | If the given Inline element is an image with a @src@ path equal to
-- one in the list of @paths@, then prepends @dir@ to the image source; -- one in the list of @paths@, then prepends @dir@ to the image source;
-- returns the element unchanged otherwise. -- returns the element unchanged otherwise.
adjustImagePath :: FilePath -> MediaBag -> Inline -> Inline adjustImagePath :: FilePath -> MediaBag -> Inline -> Inline
adjustImagePath dir mediabag (Image attr lab (src, tit)) = adjustImagePath dir mediabag (Image attr lab (src, tit)) =
case lookupMedia (T.unpack src) mediabag of case lookupMedia (T.unpack src) mediabag of
Nothing -> Image attr lab (src, tit) Nothing -> Image attr lab (src, tit)
Just item -> Just item ->
let fullpath = dir </> mediaPath item let fullpath = dir <> "/" <> mediaPath item
in Image attr lab (T.pack fullpath, tit) in Image attr lab (T.pack fullpath, tit)
adjustImagePath _ _ x = x adjustImagePath _ _ x = x
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)