Explorar o código

escape source map file \ (close #2212)

Nicolas Cannasse %!s(int64=12) %!d(string=hai) anos
pai
achega
0fcab3e9be
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -224,7 +224,7 @@ let write_mappings ctx =
 	in
 	output_string channel "{\n";
 	output_string channel "\"version\":3,\n";
-	output_string channel ("\"file\":\"" ^ basefile ^ "\",\n");
+	output_string channel ("\"file\":\"" ^ (String.concat "\\\\" (ExtString.String.nsplit basefile "\\")) ^ "\",\n");
 	output_string channel ("\"sourceRoot\":\"file://\",\n");
 	output_string channel ("\"sources\":[" ^
 		(String.concat "," (List.map (fun s -> "\"" ^ to_url s ^ "\"") sources)) ^