summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/ODT.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs
index e3f839dd5..17312387d 100644
--- a/src/Text/Pandoc/Writers/ODT.hs
+++ b/src/Text/Pandoc/Writers/ODT.hs
@@ -77,8 +77,9 @@ fixInternalLinks = walk go
go x = x
fixRel uri =
case parseRelativeReference (T.unpack uri) of
- Nothing -> uri
- Just u -> tshow $ u{ uriPath = "../" <> uriPath u }
+ Just u
+ | not (null (uriPath u)) -> tshow $ u{ uriPath = "../" <> uriPath u }
+ _ -> uri
-- | Produce an ODT file from a Pandoc document.
pandocToODT :: PandocMonad m