Skip to content

Commit

Permalink
Use characters instead of u32 in confusable map (#8463)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Nov 3, 2023
1 parent 41e538a commit 7c12eaf
Show file tree
Hide file tree
Showing 3 changed files with 1,602 additions and 1,594 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub(crate) fn ambiguous_unicode_character(
let candidate = Candidate::new(
TextSize::try_from(relative_offset).unwrap() + range.start(),
current_char,
char::from_u32(representant).unwrap(),
representant,
);
if let Some(diagnostic) = candidate.into_diagnostic(context, settings) {
diagnostics.push(diagnostic);
Expand All @@ -178,7 +178,7 @@ pub(crate) fn ambiguous_unicode_character(
word_candidates.push(Candidate::new(
TextSize::try_from(relative_offset).unwrap() + range.start(),
current_char,
char::from_u32(representant).unwrap(),
representant,
));
} else {
// The current word contains at least one unambiguous unicode character.
Expand Down

0 comments on commit 7c12eaf

Please sign in to comment.