소스 검색

[js] fix for source maps (there are still issues)

Simon Krajewski 9 년 전
부모
커밋
54e04514f2
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/generators/genjs.ml

+ 2 - 1
src/generators/genjs.ml

@@ -142,10 +142,11 @@ let handle_newlines ctx str =
 				let next = String.index_from str from '\n' + 1 in
 				Rbuffer.add_char ctx.smap.mappings ';';
 				ctx.smap.output_last_col <- 0;
+				ctx.smap.output_current_col <- 0;
 				ctx.smap.print_comma <- false;
 				loop next
 			end with Not_found ->
-				ctx.smap.output_current_col <- String.length str - from
+				ctx.smap.output_current_col <- ctx.smap.output_current_col + (String.length str - from);
 		in
 		loop 0
 	else ()