Skip to content

Commit 82a1663

Browse files
committed
Fixed handling of escaped newlines
1 parent 34892d7 commit 82a1663

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/cli/strings.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ open! Core
22
open Lwt.Infix
33
open Lwt.Syntax
44

5-
let version = "2.2.1"
5+
let version = "2.2.2"
66

77
let header = sprintf "/* Generated by okTurtles/strings v%s */\n\n" version
88

src/parsing/basic.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ let escapable_string_parser ~escape ~separator =
6767
let result = Buffer.contents buf in
6868
Buffer.clear buf;
6969
return result
70+
| 'n', true ->
71+
Buffer.add_char buf '\n';
72+
loop false
7073
| c, true ->
7174
Buffer.add_char buf c;
7275
loop false

src/quickjs/quickjs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ value stub_init_contexts(value v_num_threads)
3737
JS_FreeRuntime(rt);
3838
} else {
3939
JS_FreeValue(ctx, ret_val);
40-
contexts[i] = move(ctx);
40+
contexts[i] = std::move(ctx);
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)