| ... | @@ -134,7 +134,9 @@ fn parseString(alloc: std.mem.Allocator, p: *Parser) anyerror!?StringIndex { | ... | @@ -134,7 +134,9 @@ fn parseString(alloc: std.mem.Allocator, p: *Parser) anyerror!?StringIndex { |
| 134 | break; | 134 | break; |
| 135 | } | 135 | } |
| 136 | if (c != '\\') { | 136 | if (c != '\\') { |
| 137 | try characters.append(@intCast(c)); | 137 | const l = std.unicode.utf8CodepointSequenceLength(c) catch unreachable; |
| | 138 | const b = p.temp.items[p.idx - l ..][0..l]; |
| | 139 | try characters.appendSlice(b); |
| 138 | continue; | 140 | continue; |
| 139 | } | 141 | } |
| 140 | switch (try p.shift()) { | 142 | switch (try p.shift()) { |