{"action":"created","issue":{"url":"https://api.github.com/repos/tj64/outorg/issues/11","labels_url":"https://api.github.com/repos/tj64/outorg/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/tj64/outorg/issues/11/comments","events_url":"https://api.github.com/repos/tj64/outorg/issues/11/events","html_url":"https://github.com/tj64/outorg/pull/11","id":53990204,"number":11,"title":"Fix an issue with buffers ending with code.","user":{"login":"acowley","id":124545,"avatar_url":"https://avatars.githubusercontent.com/u/124545?v=3","gravatar_id":"","url":"https://api.github.com/users/acowley","html_url":"https://github.com/acowley","followers_url":"https://api.github.com/users/acowley/followers","following_url":"https://api.github.com/users/acowley/following{/other_user}","gists_url":"https://api.github.com/users/acowley/gists{/gist_id}","starred_url":"https://api.github.com/users/acowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acowley/subscriptions","organizations_url":"https://api.github.com/users/acowley/orgs","repos_url":"https://api.github.com/users/acowley/repos","events_url":"https://api.github.com/users/acowley/events{/privacy}","received_events_url":"https://api.github.com/users/acowley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-11T12:17:59Z","updated_at":"2015-01-12T02:48:32Z","closed_at":"2015-01-11T14:26:59Z","pull_request":{"url":"https://api.github.com/repos/tj64/outorg/pulls/11","html_url":"https://github.com/tj64/outorg/pull/11","diff_url":"https://github.com/tj64/outorg/pull/11.diff","patch_url":"https://github.com/tj64/outorg/pull/11.patch"},"body":"The parser could get into an infinite loop for want of handling possible arrangements of markers at the end of the buffer. \r\n\r\nNamely, the beginning-of-code marker (B) ends up at point-max, while the end-of-code marker (C) is moved to the end of a code block on the last non-empty line of the file (1- (point-max)), taking point with it.\r\n\r\nThis fixes one snag I've run into a few times. Another is if a buffer ends with a headline, I get an error regarding markers. Haven't tracked that down yet."},"comment":{"url":"https://api.github.com/repos/tj64/outorg/issues/comments/69525170","html_url":"https://github.com/tj64/outorg/pull/11#issuecomment-69525170","issue_url":"https://api.github.com/repos/tj64/outorg/issues/11","id":69525170,"user":{"login":"acowley","id":124545,"avatar_url":"https://avatars.githubusercontent.com/u/124545?v=3","gravatar_id":"","url":"https://api.github.com/users/acowley","html_url":"https://github.com/acowley","followers_url":"https://api.github.com/users/acowley/followers","following_url":"https://api.github.com/users/acowley/following{/other_user}","gists_url":"https://api.github.com/users/acowley/gists{/gist_id}","starred_url":"https://api.github.com/users/acowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acowley/subscriptions","organizations_url":"https://api.github.com/users/acowley/orgs","repos_url":"https://api.github.com/users/acowley/repos","events_url":"https://api.github.com/users/acowley/events{/privacy}","received_events_url":"https://api.github.com/users/acowley/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T02:48:32Z","updated_at":"2015-01-12T02:48:32Z","body":"I totally agree that a bit of caution would be good. I do some amount of probing before opening a PR, but it's quite an unstructured domain we're dealing with here given that we want to support as many languages as possible.\r\n\r\nPerhaps we should look into accumulating a library of test files for which we could at least verify they round-trip through outorg successfully with automated tests."}}