autodoc: fix tokenizer

This commit is contained in:
andrewkraevskii authored and Andrew Kelley committed 2024-04-10 20:44:10 -07:00
1 parent 7fb5a0b18b
commit f7a76bdfe3
1 file changed
+1 -1
+1 -1
View File
@@ -1540,7 +1540,7 @@ const InlineParser = struct {
iter.pos += 1;
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]);
const cp_encoded = if (is_valid)
iter.content[iter.pos..][0..cp_len]