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

Unicode character in match template appears to break matching/behaves as wildcard #369

Open
jakereps opened this issue Sep 11, 2023 · 1 comment

Comments

@jakereps
Copy link

jakereps commented Sep 11, 2023

Describe the bug
When trying to replace a unicode character Ω (used by ginkgo/gomega as an Expect alternative), comby seems to match far more than intended. If I remove the Ω entirely and just run (:[1]) it matches much less than when the Ω is present, so it almost seems like it's being seen as a wildcard of some sort.

Reproducing

Expected behavior
I'd expect all items matching Ω(:[1]) to become Expect(:[1]).

Additional context
Surprisingly exhibited as timeouts on rewriting every file due to rewriting every .*() in the file with the intended pattern.

@rvantonder
Copy link
Member

Fascinating. I can reproduce, thanks for the report. I think there's something fishy going on with the unicode encoding and how the parser is reading things (e.g., it doesn't reproduce with something like ✓). Will need some time to investigate more deeply

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