Skip to content
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

Bug: incorrect/spurious transformation être → êtree. #633

Closed
1 task done
lebigot opened this issue Feb 24, 2023 · 7 comments · Fixed by #643
Closed
1 task done

Bug: incorrect/spurious transformation être → êtree. #633

lebigot opened this issue Feb 24, 2023 · 7 comments · Fixed by #643
Assignees
Labels
bug Something isn't working resolution/update-made A change has been made that should resolve this issue or request

Comments

@lebigot
Copy link

lebigot commented Feb 24, 2023

Describe the Bug

When a text contains "être", this word is transformed into "êtree", which is incorrect (in French).

How to Reproduce

Steps to reproduce the behavior:

  1. Make sure that "Auto-correct common misspellings" is On in the Linter settings.
  2. Type "être" in a note.
  3. Launch the linter.

Expected Behavior

The word "être" should instead not be touched.

Device

  • Desktop
  • Mobile not tested
@lebigot lebigot added the bug Something isn't working label Feb 24, 2023
@pjkaufman
Copy link
Collaborator

Hey @lebigot , is there a reason not to add that value to the ignore list? English is the only language that the auto fix is really designed for. So for French words that may be the case, but when used in English it may not be the same (assuming that is even a thing). However if that is a French word and the English usage is spelled as you suggest, that should probably be bubbled up to the codespell maintainers to get it fixed there as well.

@pjkaufman
Copy link
Collaborator

I have not heard anything about this. in about 2 weeks. If I do not hear anything else by Sunday, I will close this issue since I am not able to validate the claim here on my own with the information provided.

@pjkaufman pjkaufman added the question Further information is requested label Mar 8, 2023
@lebigot
Copy link
Author

lebigot commented Mar 9, 2023

There is a reason to not add "être" to the ignore list: there is no valid reason for it to be transformed into "êtree" anyway, be it in French or English, where "êtree" doesn't exist, and obviously fixing this at the source is obviously more useful for everybody. :)

Now, codespell 2.2.4 (the latest version) doesn't run into this problem.

Maybe the bug comes from a previous version of codespell? Maybe it is somewhere in linter? Maybe it's a wild guess, but maybe linter somehow doesn't recognize the "ê" and codespell (via linter, not called directly through codespell 2.2.4) applies its rule "tre" → "tree", resulting in "être" being transformed into "êtree", which is not correct?

@pjkaufman
Copy link
Collaborator

This may be a bug in the Linter where that rule you suggested may be getting applied. Let me see if it gets modified in a UT and move forward from there. The possibility you suggested could be the case. I wonder if python has a different default set for regex which could cause the issue in question.

@pjkaufman
Copy link
Collaborator

Looks like I have a fix for this. Thanks for taking a look at codespell and verifying it was not in the list @lebigot !

@pjkaufman
Copy link
Collaborator

The change should go out with the next release.

@pjkaufman pjkaufman self-assigned this Mar 9, 2023
@pjkaufman pjkaufman removed the question Further information is requested label Mar 9, 2023
@lebigot
Copy link
Author

lebigot commented Mar 10, 2023

Great, thanks!

@pjkaufman pjkaufman added the resolution/update-made A change has been made that should resolve this issue or request label Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolution/update-made A change has been made that should resolve this issue or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants