-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(developer): range warning for non-NFD chars 🙀 #10614
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
…oper/10316-range-warning
protected analyzeCodePoint(c: string, ch: number): BadStringType { | ||
const nfd = c.normalize("NFD"); | ||
if (c !== nfd) { | ||
return BadStringType.denormalized; | ||
} else { | ||
return null; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder about the performance of this -- seems like it could be quite expensive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right. maybe some kind of cache would help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, could perhaps cache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's only on actual ranges in transforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, limited use so we can probably ignore for now. If it's always a single codepoint we could build a map and ship it -- trivial. Danger with that is that if we use normalize()
elsewhere then the map could be inconsistent wrt Unicode version.
Our messages (errors, hints, and warnings) don't have line numbers at present, which is going to be quite painful for users! |
|
…oper/10316-range-warning
Changes in this pull request will be available for download in Keyman version 17.0.262-alpha |
Fixes: #10316
@keymanapp-test-bot skip