From 5a1bd526776a9c75a1f348f42415d15d78969e8b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 6 Oct 2021 12:33:22 -0700 Subject: Don't prepend `file://` to `--syntax-definition` on Windows. This was a fix for a problem in skylighting, but this problem doesn't exist now that we've moved from HXT to xml-conduit. Cf. #6374. --- src/Text/Pandoc/App/CommandLineOptions.hs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/Text/Pandoc/App') diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs index 99017000a..0d3c12c30 100644 --- a/src/Text/Pandoc/App/CommandLineOptions.hs +++ b/src/Text/Pandoc/App/CommandLineOptions.hs @@ -337,14 +337,8 @@ options = , Option "" ["syntax-definition"] (ReqArg - (\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 - _ -> normalizePath arg - return opt{ optSyntaxDefinitions = arg' : + (\arg opt -> + return opt{ optSyntaxDefinitions = normalizePath arg : optSyntaxDefinitions opt }) "FILE") "" -- "Syntax definition (xml) file" -- cgit v1.2.3