aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/App.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 2fb7c92db..5775f6a6c 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -1101,8 +1101,15 @@ options =
, Option "" ["syntax-definition"]
(ReqArg
- (\arg opt -> return opt{ optSyntaxDefinitions = arg :
- optSyntaxDefinitions opt })
+ (\arg opt -> do
+ let tr c d = map (\x -> if x == c then d else x)
+ let arg' = case arg of -- see #4836
+ -- HXT confuses Windows path with URI
+ _:':':'\\':_ ->
+ "file:///" ++ tr '\\' '/' arg
+ _ -> arg
+ return opt{ optSyntaxDefinitions = arg' :
+ optSyntaxDefinitions opt })
"FILE")
"" -- "Syntax definition (xml) file"