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

Merge Casing Issue #26

Closed
arahusky opened this issue Apr 19, 2021 · 2 comments
Closed

Merge Casing Issue #26

arahusky opened this issue Apr 19, 2021 · 2 comments

Comments

@arahusky
Copy link

Hello Chris,
I am working on Errant for Czech and found the following line problematic:

if start == 0 and (len(o) == 1 and c[0].text[0].isupper()) or \

The issue is that it is True even if start != 0 (if (len(c) == 1 and o[0].text[0].isupper()) gets evaluated to True.

In such case, return on lines 66-67 will omit "the preceding part of combo".

I suppose that the fix is to enforce start == 0 by adding a pair of brackets:

if start == 0 and ((len(o) == 1 and c[0].text[0].isupper()) or \
                    (len(c) == 1 and o[0].text[0].isupper())):
@chrisjbryant
Copy link
Owner

Heya,

Thanks for the report! Looks like a bracketing issue indeed so I'll make a note to fix it in the next version.

@chrisjbryant
Copy link
Owner

Fixed in v2.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants