{"action":"created","issue":{"url":"https://api.github.com/repos/wooorm/mdast-lint/issues/31","labels_url":"https://api.github.com/repos/wooorm/mdast-lint/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/wooorm/mdast-lint/issues/31/comments","events_url":"https://api.github.com/repos/wooorm/mdast-lint/issues/31/events","html_url":"https://github.com/wooorm/mdast-lint/issues/31","id":121988251,"number":31,"title":"hard-break-spaces false positive","user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-14T07:20:06Z","updated_at":"2015-12-14T16:55:00Z","closed_at":null,"body":"I have a markdown file with the following markup:\r\n\r\n```\r\n-   A bullet with two trailing spaces  \r\n    Next line obviously starting with two spaces.\r\n\r\n```\r\n\r\nThe linter shows the warning: `Use two spaces for hard line break` but that is exactly what the example does.\r\n\r\nFrom looking into a code the `contents.slice(start, end)` (https://github.com/wooorm/mdast-lint/blob/50f350b02f8d0859663c45a5760f0767e9195670/lib/rules/hard-break-spaces.js#L49) seems to contain not only the two trailing spaces and the newline but also the two leading spaces of the next line. Therefore the length is greater then 3 hence the warning.\r\n\r\nArguably I could remove the leading spaces but I think the rule should not trigger in this case."},"comment":{"url":"https://api.github.com/repos/wooorm/mdast-lint/issues/comments/164493124","html_url":"https://github.com/wooorm/mdast-lint/issues/31#issuecomment-164493124","issue_url":"https://api.github.com/repos/wooorm/mdast-lint/issues/31","id":164493124,"user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T16:55:00Z","updated_at":"2015-12-14T16:55:00Z","body":"I have updated the snippet (to use the default setting with more spaces). Then it happens without any custom configuration file.\r\n\r\nThere doesn't have to be a surrounding text. The snippet can be the only content in the file."}}