{"action":"created","issue":{"url":"https://api.github.com/repos/MacPass/MacPassHTTP/issues/23","repository_url":"https://api.github.com/repos/MacPass/MacPassHTTP","labels_url":"https://api.github.com/repos/MacPass/MacPassHTTP/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/MacPass/MacPassHTTP/issues/23/comments","events_url":"https://api.github.com/repos/MacPass/MacPassHTTP/issues/23/events","html_url":"https://github.com/MacPass/MacPassHTTP/pull/23","id":142233996,"number":23,"title":"Update url matching to use levenshtein distance","user":{"login":"nuudles","id":741746,"avatar_url":"https://avatars.githubusercontent.com/u/741746?v=3","gravatar_id":"","url":"https://api.github.com/users/nuudles","html_url":"https://github.com/nuudles","followers_url":"https://api.github.com/users/nuudles/followers","following_url":"https://api.github.com/users/nuudles/following{/other_user}","gists_url":"https://api.github.com/users/nuudles/gists{/gist_id}","starred_url":"https://api.github.com/users/nuudles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuudles/subscriptions","organizations_url":"https://api.github.com/users/nuudles/orgs","repos_url":"https://api.github.com/users/nuudles/repos","events_url":"https://api.github.com/users/nuudles/events{/privacy}","received_events_url":"https://api.github.com/users/nuudles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-21T01:41:34Z","updated_at":"2016-03-21T08:28:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MacPass/MacPassHTTP/pulls/23","html_url":"https://github.com/MacPass/MacPassHTTP/pull/23","diff_url":"https://github.com/MacPass/MacPassHTTP/pull/23.diff","patch_url":"https://github.com/MacPass/MacPassHTTP/pull/23.patch"},"body":"This update uses the levenshtein distance algorithm to determine the best matched entry, similar to how the KeePassHTTP plugin performs. This alleviates issues such as \"www.facebook.com\" not matching an entry whose URL is \"facebook.com\".\r\n\r\nNote that this might produce false positives, particularly if passed a URL that doesn't exist in any of the entries, but in my experiments it works quite well."},"comment":{"url":"https://api.github.com/repos/MacPass/MacPassHTTP/issues/comments/199170389","html_url":"https://github.com/MacPass/MacPassHTTP/pull/23#issuecomment-199170389","issue_url":"https://api.github.com/repos/MacPass/MacPassHTTP/issues/23","id":199170389,"user":{"login":"mstarke","id":58428,"avatar_url":"https://avatars.githubusercontent.com/u/58428?v=3","gravatar_id":"","url":"https://api.github.com/users/mstarke","html_url":"https://github.com/mstarke","followers_url":"https://api.github.com/users/mstarke/followers","following_url":"https://api.github.com/users/mstarke/following{/other_user}","gists_url":"https://api.github.com/users/mstarke/gists{/gist_id}","starred_url":"https://api.github.com/users/mstarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstarke/subscriptions","organizations_url":"https://api.github.com/users/mstarke/orgs","repos_url":"https://api.github.com/users/mstarke/repos","events_url":"https://api.github.com/users/mstarke/events{/privacy}","received_events_url":"https://api.github.com/users/mstarke/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T08:28:52Z","updated_at":"2016-03-21T08:28:52Z","body":"The Levenshtein distance is used to order Login entries but not for actually retrieving them, or do I read the code wrong?. You're using it to actually match, which changes the behaviour drastically. I do not intend to move away from the original implementation and to be honest I did just port @jameshurst implementation without any changes to the actual logic. If I'm wrong, it'll be merged promptly ;)"}}