mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
autodoc: fix tokenizer
This commit is contained in:
parent
7fb5a0b18b
commit
f7a76bdfe3
1 changed files with 1 additions and 1 deletions
|
|
@ -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]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue