mirror of
https://github.com/ziglang/zig.git
synced 2026-10-14 10:27:43 -04:00
autodoc: fix tokenizer
This commit is contained in:
1 parent
7fb5a0b18b
commit
f7a76bdfe3
1 file changed
+1
-1
@@ -1540,7 +1540,7 @@ const InlineParser = struct {
|
|||||||
iter.pos += 1;
|
iter.pos += 1;
|
||||||
return .{ .text = replacement };
|
return .{ .text = replacement };
|
||||||
};
|
};
|
||||||
const is_valid = iter.pos + cp_len < iter.content.len and
|
const is_valid = iter.pos + cp_len <= iter.content.len and
|
||||||
std.unicode.utf8ValidateSlice(iter.content[iter.pos..][0..cp_len]);
|
std.unicode.utf8ValidateSlice(iter.content[iter.pos..][0..cp_len]);
|
||||||
const cp_encoded = if (is_valid)
|
const cp_encoded = if (is_valid)
|
||||||
iter.content[iter.pos..][0..cp_len]
|
iter.content[iter.pos..][0..cp_len]
|
||||||
|
|||||||
Reference in new issue
Block a user