git.iko.soy/typeable/pandoc
on master help sign in
Work around HXT limitation for --syntax-definition with windows drive.
65614a8John MacFarlane
src/Text/Pandoc/App.hs+9−2
@@ -1101,8 +1101,15 @@ options =
1101
1101
1102 , Option "" ["syntax-definition"]
1102 , Option "" ["syntax-definition"]
1103 (ReqArg
1103 (ReqArg
1104+ (\arg opt -> do
1105+ let tr c d = map (\x -> if x == c then d else x)
1106+ let arg' = case arg of -- see #4836
1107+ -- HXT confuses Windows path with URI
1108+ _:':':'\\':_ ->
1109+ "file:///" ++ tr '\\' '/' arg
1110+ _ -> arg
1104− (\arg opt -> return opt{ optSyntaxDefinitions = arg :
1111+ return opt{ optSyntaxDefinitions = arg' :
1105− optSyntaxDefinitions opt })
1112+ optSyntaxDefinitions opt })
1106 "FILE")
1113 "FILE")
1107 "" -- "Syntax definition (xml) file"
1114 "" -- "Syntax definition (xml) file"
1108
1115