Răsfoiți Sursa

escape source map file \ (close #2212)

Nicolas Cannasse 12 ani în urmă
părinte
comite
0fcab3e9be
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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)) ^