File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,9 @@ module Mappings = struct
340340 0
341341 edits
342342 in
343+ (* Remove trailing ';' *)
344+ if Buffer. length buf > 0 then
345+ Buffer. truncate buf (Buffer. length buf - 1 );
343346 Uninterpreted (Buffer. contents buf)
344347
345348 let num_gen_lines m =
@@ -411,6 +414,9 @@ module Mappings = struct
411414 0
412415 (List. init ~len: (num_gen_lines m2) ~f: (Fun. const Line_edits. Keep ))
413416 in
417+ (* Remove trailing ';' *)
418+ if Buffer. length buf > 0 then
419+ Buffer. truncate buf (Buffer. length buf - 1 );
414420 Uninterpreted (Buffer. contents buf)
415421
416422 let encode mapping =
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ let%expect_test _ =
153153 print_mapping m;
154154 [% expect
155155 {|
156- CASU ;;GCUU ;;;;;;;;;;;;;;;;;;;;GCff ;
156+ CASU ;;GCUU ;;;;;;;;;;;;;;;;;;;;GCff
157157 sa :10 :10 -> 1 :1
158158 sb :20 :20 -> 3 :3
159159 sa2 :5 :5 -> 23 :3 |}]
You can’t perform that action at this time.
0 commit comments