aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-10-28 20:00:19 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-10-28 20:00:19 -0700
commit189c0347388a487402e182622c9dff72b152694f (patch)
tree22c1804d9f397c2b70e0b00b2fd8494775455c98
parent93b82e8ea6a6ea3263a54b7d2a78e910323505b8 (diff)
parent8ad321d0d49964ec295d1d62d35ce3157b2bc9d0 (diff)
downloadpandoc-189c0347388a487402e182622c9dff72b152694f.tar.gz
Merge pull request #1727 from toddsifleet/tws-fix-issue-1682
Strip querystring in ODT write
-rw-r--r--src/Text/Pandoc/Writers/ODT.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs
index 03f8e8ba4..e216e616e 100644
--- a/src/Text/Pandoc/Writers/ODT.hs
+++ b/src/Text/Pandoc/Writers/ODT.hs
@@ -138,7 +138,8 @@ transformPicMath opts entriesRef (Image lab (src,_)) = do
let (w,h) = fromMaybe (0,0) $ sizeInPoints `fmap` size
let tit' = show w ++ "x" ++ show h
entries <- readIORef entriesRef
- let newsrc = "Pictures/" ++ show (length entries) ++ takeExtension src
+ let extension = takeExtension $ takeWhile (/='?') src
+ let newsrc = "Pictures/" ++ show (length entries) ++ extension
let toLazy = B.fromChunks . (:[])
epochtime <- floor `fmap` getPOSIXTime
let entry = toEntry newsrc epochtime $ toLazy img