comby icon indicating copy to clipboard operation
comby copied to clipboard

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

Open jakereps opened this issue 1 year ago • 1 comments

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

  • If this looks like a bug in the matcher, go to https://comby.live and paste a shared link below: https://bit.ly/3Zh34v4

  • If this is not about a matcher, please describe the bug: N/A

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.

jakereps avatar Sep 11 '23 22:09 jakereps

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

rvantonder avatar Sep 12 '23 18:09 rvantonder