-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
[Enhancement] More info on apply_autocorrect
#21056
Conversation
apply_autocorrect
found a bug. It looks like it will grab text from before the word to correct:
Mostly was trying to trigger "payed", but if you don't have a space before the word, it will include everything up til the last space/terminator character. |
Not a bug, but a limitation on how the algorithm works It has no concept of "words" , we just have a stream of chars in which we find for patterns to be replaced (since we can use spaces to hopefully correctly delimit words, my code does so) I dont think there's a way of fixing this issue without major changes to the correction code PS: Anyway it doesnt feel like a very common scenario to run into |
Yeah. And this issue isn't a stopping issue. However, I think that because this change makes this more obvious, a note about this behavior should be added as it will likely come up more often if/when people can render the "word". |
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Description
The information received on the hook was not very useful because it only showed part of global state, namely how to fix it. However it provided no information on what the typo being solved was.
Thus we now also provide both the wrong and corrected versions of the strings.
Also updated its only usage over the repo.
Types of Changes
Issues Fixed or Closed by This PR
Checklist