{"action":"created","issue":{"url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher/issues/29","repository_url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher","labels_url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher/issues/29/comments","events_url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher/issues/29/events","html_url":"https://github.com/FelikZ/ctrlp-py-matcher/issues/29","id":157021205,"number":29,"title":"Fix the case-(in)sensitivity related issues in the matcher","user":{"login":"romix","id":1481811,"avatar_url":"https://avatars.githubusercontent.com/u/1481811?v=3","gravatar_id":"","url":"https://api.github.com/users/romix","html_url":"https://github.com/romix","followers_url":"https://api.github.com/users/romix/followers","following_url":"https://api.github.com/users/romix/following{/other_user}","gists_url":"https://api.github.com/users/romix/gists{/gist_id}","starred_url":"https://api.github.com/users/romix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romix/subscriptions","organizations_url":"https://api.github.com/users/romix/orgs","repos_url":"https://api.github.com/users/romix/repos","events_url":"https://api.github.com/users/romix/events{/privacy}","received_events_url":"https://api.github.com/users/romix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-26T16:10:00Z","updated_at":"2016-06-21T18:52:10Z","closed_at":null,"body":"The matcher currently seems to be always lower the strings, before it does the actual matching.\r\n\r\nThis is fine in most cases. But sometimes it leads to strange results. For example, if you are in a regex mode and you look just for a regex which is a simple string \"MySubstring\" (not the two uppercase letters), you won't get any results, even if the actual original line contains it. This happens, because the regex is case-sensitive, but the lines it is being matched against are not, since they are lowered. \r\n\r\nYou should probably either avoid lowering lines in some cases. \r\nOr you should use the case insensitive matching mode for regexes, which can be easily done by replacing the current:\r\n\r\n```python\r\nprog = re.compile(regex)\r\n```\r\nby\r\n```python\r\nprog = re.compile(regex, re.IGNORECASE)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher/issues/comments/227536081","html_url":"https://github.com/FelikZ/ctrlp-py-matcher/issues/29#issuecomment-227536081","issue_url":"https://api.github.com/repos/FelikZ/ctrlp-py-matcher/issues/29","id":227536081,"user":{"login":"romix","id":1481811,"avatar_url":"https://avatars.githubusercontent.com/u/1481811?v=3","gravatar_id":"","url":"https://api.github.com/users/romix","html_url":"https://github.com/romix","followers_url":"https://api.github.com/users/romix/followers","following_url":"https://api.github.com/users/romix/following{/other_user}","gists_url":"https://api.github.com/users/romix/gists{/gist_id}","starred_url":"https://api.github.com/users/romix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romix/subscriptions","organizations_url":"https://api.github.com/users/romix/orgs","repos_url":"https://api.github.com/users/romix/repos","events_url":"https://api.github.com/users/romix/events{/privacy}","received_events_url":"https://api.github.com/users/romix/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T18:52:10Z","updated_at":"2016-06-21T18:52:10Z","body":"@FelikZ Yes, I've run some benchmarks and re.IGNORECASE is much slower in many cases.\r\nBut another approach that I mentioned seems to work just fine, namely lowercasing the regex before you call re.compile on it. It does not lead to performance degradation and it finds proper strings.\r\nWould do you think about adding this change to your code?"}}
{"actor":{"display_login":"romix"}}