git.iko.soy/typeable/pandoc
on master help sign in
Strip querystring in ODT write
8ad321dTodd Sifleet
src/Text/Pandoc/Writers/ODT.hs+2−1
@@ -138,7 +138,8 @@ transformPicMath opts entriesRef (Image lab (src,_)) = do
138 let (w,h) = fromMaybe (0,0) $ sizeInPoints `fmap` size
138 let (w,h) = fromMaybe (0,0) $ sizeInPoints `fmap` size
139 let tit' = show w ++ "x" ++ show h
139 let tit' = show w ++ "x" ++ show h
140 entries <- readIORef entriesRef
140 entries <- readIORef entriesRef
141+ let extension = takeExtension $ takeWhile (/='?') src
141− let newsrc = "Pictures/" ++ show (length entries) ++ takeExtension src
142+ let newsrc = "Pictures/" ++ show (length entries) ++ extension
142 let toLazy = B.fromChunks . (:[])
143 let toLazy = B.fromChunks . (:[])
143 epochtime <- floor `fmap` getPOSIXTime
144 epochtime <- floor `fmap` getPOSIXTime
144 let entry = toEntry newsrc epochtime $ toLazy img
145 let entry = toEntry newsrc epochtime $ toLazy img