aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class/PandocMonad.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-30 10:22:02 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-30 10:23:00 -0700
commitcc206af392a40dd7b01b714ae7f33b2fbf4925cc (patch)
tree1beb128e056d793fa0e336bd029f80b724d61591 /src/Text/Pandoc/Class/PandocMonad.hs
parentc2f46e6df4a80a313ab4329b740770dbdfbe1578 (diff)
downloadpandoc-cc206af392a40dd7b01b714ae7f33b2fbf4925cc.tar.gz
Have LoadedResource use relative paths.
The immediate reason for this is to allow the test output of #3752 to work on both windows and linux.
Diffstat (limited to 'src/Text/Pandoc/Class/PandocMonad.hs')
-rw-r--r--src/Text/Pandoc/Class/PandocMonad.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Class/PandocMonad.hs b/src/Text/Pandoc/Class/PandocMonad.hs
index b5f401619..4eb80df29 100644
--- a/src/Text/Pandoc/Class/PandocMonad.hs
+++ b/src/Text/Pandoc/Class/PandocMonad.hs
@@ -66,7 +66,7 @@ import Network.URI ( escapeURIString, nonStrictRelativeTo,
unEscapeString, parseURIReference, isAllowedInURI,
parseURI, URI(..) )
import System.FilePath ((</>), takeExtension, dropExtension,
- isRelative, splitDirectories)
+ isRelative, splitDirectories, makeRelative)
import System.Random (StdGen)
import Text.Collate.Lang (Lang(..), parseLang, renderLang)
import Text.Pandoc.Class.CommonState (CommonState (..))
@@ -413,7 +413,7 @@ downloadOrRead s = do
(fp', cont) <- if isRelative f
then withPaths resourcePath readFileStrict f
else (f,) <$> readFileStrict f
- report $ LoadedResource f fp'
+ report $ LoadedResource f (makeRelative "." fp')
return (cont, mime)
httpcolon = URI{ uriScheme = "http:",
uriAuthority = Nothing,