Ver Fonte

escape source map file \ (close #2212)

Nicolas Cannasse há 12 anos atrás
pai
commit
0fcab3e9be
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

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