ODT writer: further refinement to #3524.

Don't alter the link if the path is empty.
This commit is contained in:
John MacFarlane
2022-10-24 20:24:27 -07:00
parent 0e85a77f78
commit 8b0519bd3e
+3 -2
View File
@@ -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