{"action":"created","issue":{"url":"https://api.github.com/repos/carrot/roots-dynamic-content/issues/23","labels_url":"https://api.github.com/repos/carrot/roots-dynamic-content/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/carrot/roots-dynamic-content/issues/23/comments","events_url":"https://api.github.com/repos/carrot/roots-dynamic-content/issues/23/events","html_url":"https://github.com/carrot/roots-dynamic-content/pull/23","id":73352524,"number":23,"title":"Using os.EOL is not a good decision for front matter matching.","user":{"login":"sourcehunter","id":2227859,"avatar_url":"https://avatars.githubusercontent.com/u/2227859?v=3","gravatar_id":"","url":"https://api.github.com/users/sourcehunter","html_url":"https://github.com/sourcehunter","followers_url":"https://api.github.com/users/sourcehunter/followers","following_url":"https://api.github.com/users/sourcehunter/following{/other_user}","gists_url":"https://api.github.com/users/sourcehunter/gists{/gist_id}","starred_url":"https://api.github.com/users/sourcehunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourcehunter/subscriptions","organizations_url":"https://api.github.com/users/sourcehunter/orgs","repos_url":"https://api.github.com/users/sourcehunter/repos","events_url":"https://api.github.com/users/sourcehunter/events{/privacy}","received_events_url":"https://api.github.com/users/sourcehunter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-05T15:51:18Z","updated_at":"2015-05-05T16:08:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/carrot/roots-dynamic-content/pulls/23","html_url":"https://github.com/carrot/roots-dynamic-content/pull/23","diff_url":"https://github.com/carrot/roots-dynamic-content/pull/23.diff","patch_url":"https://github.com/carrot/roots-dynamic-content/pull/23.patch"},"body":"os.EOL was not correctly used in the regexes and is not a good overall choice: when you check out a file with Linux style line endings on a Windows machine or vice versa you end up with errors and I would argue this not an uncommon case.\r\n\r\nOn to the more subtle problems on Windows machines in the usage as done in this library:\r\n1. `br = \"\\\\#{os.EOL}\" `: you only escape the first char of the EOL string. (on Windows `os.EOL` is `'\\r\\n'`)\r\n2. `os.EOL.substring(0,1)` does not match Linux style line endings on Windows machines and vice versa.\r\n3. `#{br}?`: you make only the second char the EOL string optional which leads to front matter not being detected on Windows machines when the file does not end with an EOL (e.g.: `---\\r\\ntest: 'foo'\\r\\n---`)"},"comment":{"url":"https://api.github.com/repos/carrot/roots-dynamic-content/issues/comments/99127470","html_url":"https://github.com/carrot/roots-dynamic-content/pull/23#issuecomment-99127470","issue_url":"https://api.github.com/repos/carrot/roots-dynamic-content/issues/23","id":99127470,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T16:08:42Z","updated_at":"2015-05-05T16:08:42Z","body":"\n[![Coverage Status](https://coveralls.io/builds/2491019/badge)](https://coveralls.io/builds/2491019)\n\nCoverage remained the same at 100.0% when pulling **655f336d45ea938232b4798d75bc4f302cfeba99 on sourcehunter:master** into **d44fc06a46f303d3bf7fa81dc85a999f6520fcd5 on carrot:master**.\n"}}