浏览代码

escape source map file \ (close #2212)

Nicolas Cannasse 12 年之前
父节点
当前提交
0fcab3e9be
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)) ^