{"action":"closed","issue":{"url":"https://api.github.com/repos/nitlang/nit/issues/1684","labels_url":"https://api.github.com/repos/nitlang/nit/issues/1684/labels{/name}","comments_url":"https://api.github.com/repos/nitlang/nit/issues/1684/comments","events_url":"https://api.github.com/repos/nitlang/nit/issues/1684/events","html_url":"https://github.com/nitlang/nit/issues/1684","id":104282127,"number":1684,"title":"Fix use of `byte_to_char_index` and remove the `intrude import` from `re`","user":{"login":"xymus","id":208057,"avatar_url":"https://avatars.githubusercontent.com/u/208057?v=3","gravatar_id":"","url":"https://api.github.com/users/xymus","html_url":"https://github.com/xymus","followers_url":"https://api.github.com/users/xymus/followers","following_url":"https://api.github.com/users/xymus/following{/other_user}","gists_url":"https://api.github.com/users/xymus/gists{/gist_id}","starred_url":"https://api.github.com/users/xymus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xymus/subscriptions","organizations_url":"https://api.github.com/users/xymus/orgs","repos_url":"https://api.github.com/users/xymus/repos","events_url":"https://api.github.com/users/xymus/events{/privacy}","received_events_url":"https://api.github.com/users/xymus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nitlang/nit/labels/bug","name":"bug","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"R4PaSs","id":1444825,"avatar_url":"https://avatars.githubusercontent.com/u/1444825?v=3","gravatar_id":"","url":"https://api.github.com/users/R4PaSs","html_url":"https://github.com/R4PaSs","followers_url":"https://api.github.com/users/R4PaSs/followers","following_url":"https://api.github.com/users/R4PaSs/following{/other_user}","gists_url":"https://api.github.com/users/R4PaSs/gists{/gist_id}","starred_url":"https://api.github.com/users/R4PaSs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4PaSs/subscriptions","organizations_url":"https://api.github.com/users/R4PaSs/orgs","repos_url":"https://api.github.com/users/R4PaSs/repos","events_url":"https://api.github.com/users/R4PaSs/events{/privacy}","received_events_url":"https://api.github.com/users/R4PaSs/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-09-01T14:42:30Z","updated_at":"2015-09-10T02:59:53Z","closed_at":"2015-09-10T02:59:53Z","body":"The use of `byte_to_char_index` to calculate the length of the match is not appropriate. This method appears to count the number of chars over the given number of bytes from the start of the string, and thus will not work for chars starting from a given index.\r\n\r\n- [ ] Fix calls to `byte_to_char_index` to consider an offset index, marked with `#FIXME`.\r\n- [ ] Make public and document `byte_to_char_index` as it is very useful to any C wrapper.\r\n- [ ] Remove the `intrude import` from re, this module is complex enough as is and it is clearer as a normal FFI client module."}}