mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 10:01:15 +00:00
[red-knot] Fix offset handling in playground for 2-code-point UTF16 characters (#17520)
This commit is contained in:
parent
1c65e0ad25
commit
1bdb22c139
4 changed files with 101 additions and 41 deletions
|
@ -643,10 +643,9 @@ impl FromStr for OneIndexed {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum PositionEncoding {
|
||||
/// Character offsets count the number of bytes from the start of the line.
|
||||
#[default]
|
||||
Utf8,
|
||||
|
||||
/// Character offsets count the number of UTF-16 code units from the start of the line.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue