diff options
Diffstat (limited to 'src/code_point.zig')
| -rw-r--r-- | src/code_point.zig | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/code_point.zig b/src/code_point.zig index a5b10d4..ba0b434 100644 --- a/src/code_point.zig +++ b/src/code_point.zig | |||
| @@ -53,22 +53,12 @@ pub fn decodeAtCursor(bytes: []const u8, cursor: *u32) ?CodePoint { | |||
| 53 | }; | 53 | }; |
| 54 | // Multibyte | 54 | // Multibyte |
| 55 | 55 | ||
| 56 | <<<<<<< HEAD | ||
| 57 | // Second: | 56 | // Second: |
| 58 | var class: u4 = @intCast(u8dfa[byte]); | 57 | var class: u4 = @intCast(u8dfa[byte]); |
| 59 | var st: u32 = state_dfa[class]; | 58 | var st: u32 = state_dfa[class]; |
| 60 | if (st == RUNE_REJECT or cursor.* == bytes.len) { | 59 | if (st == RUNE_REJECT or cursor.* == bytes.len) { |
| 61 | @branchHint(.cold); | 60 | @branchHint(.cold); |
| 62 | // First one is never a truncation | 61 | // First one is never a truncation |
| 63 | ||||||| parent of ad4b046 (Various small iterator improvements) | ||
| 64 | // Return replacement if we don' have a complete codepoint remaining. Consumes only one byte | ||
| 65 | if (cp.len > bytes.len) { | ||
| 66 | // Unicode replacement code point. | ||
| 67 | ======= | ||
| 68 | // Return replacement if we don't have a complete codepoint remaining. Consumes only one byte. | ||
| 69 | if (cp.len > bytes.len) { | ||
| 70 | // Unicode replacement code point. | ||
| 71 | >>>>>>> ad4b046 (Various small iterator improvements) | ||
| 72 | return .{ | 62 | return .{ |
| 73 | .code = 0xfffd, | 63 | .code = 0xfffd, |
| 74 | .len = 1, | 64 | .len = 1, |