feat(web): add new specifiable model method for validating contexts for autocorrect 🚂
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
As noted by #12648, users will not expect autocorrect to trigger for all contexts. For example, in English, users generally don't expect autocorrect to trigger when typing numbers. That said, this can be language-dependent - there are some languages that use digits as letters in some contexts. (https://github.com/keymanapp/keyman/pull/12877#discussion_r1915816135)
To facilitate good all-around handling, #12877 implemented a default behavior similar to that of programming identifiers as a baseline for most languages. For cases like those alluded to with the linked comment, we also wish to add space for individual lexical models to include a method that overrides this behavior. The method would then return a `boolean` value indicating whether or not autocorrect is considered valid for the current token.
Contributor guide
Assessment
This issue has not been assessed yet.