{"action":"opened","issue":{"url":"https://api.github.com/repos/skatejs/skatejs/issues/1457","repository_url":"https://api.github.com/repos/skatejs/skatejs","labels_url":"https://api.github.com/repos/skatejs/skatejs/issues/1457/labels{/name}","comments_url":"https://api.github.com/repos/skatejs/skatejs/issues/1457/comments","events_url":"https://api.github.com/repos/skatejs/skatejs/issues/1457/events","html_url":"https://github.com/skatejs/skatejs/issues/1457","id":338613853,"node_id":"MDU6SXNzdWUzMzg2MTM4NTM=","number":1457,"title":"sk_marked strips first char of each line","user":{"login":"blikblum","id":3047126,"node_id":"MDQ6VXNlcjMwNDcxMjY=","avatar_url":"https://avatars0.githubusercontent.com/u/3047126?v=4","gravatar_id":"","url":"https://api.github.com/users/blikblum","html_url":"https://github.com/blikblum","followers_url":"https://api.github.com/users/blikblum/followers","following_url":"https://api.github.com/users/blikblum/following{/other_user}","gists_url":"https://api.github.com/users/blikblum/gists{/gist_id}","starred_url":"https://api.github.com/users/blikblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blikblum/subscriptions","organizations_url":"https://api.github.com/users/blikblum/orgs","repos_url":"https://api.github.com/users/blikblum/repos","events_url":"https://api.github.com/users/blikblum/events{/privacy}","received_events_url":"https://api.github.com/users/blikblum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-05T15:04:58Z","updated_at":"2018-07-05T15:04:58Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Bug report\r\n\r\n* Skate version: _5.2.1_ (`npm info skatejs version`)\r\n* Affected browsers (and versions): all\r\n* Running on windows\r\n\r\n### Current behavior\r\n\r\nsk_marked strips first char of each line. \r\n\r\n### Expected behavior\r\n\r\nShould not strip first char\r\n\r\nI've got this error when building the site under a windows environment. Since windows handles new lines differently the bug is not visible on linux\r\n\r\nConsider the following sk_market [code](https://github.com/skatejs/skatejs/blob/master/packages/sk-marked/src/index.js#L11):\r\n```\r\n src = src.replace(/\"/g, '&quot;');\r\n\r\n  // Remove leading newlines.\r\n  src = src.split('\\n');\r\n\r\n  // Get the initial indent so we can remove it from subsequent lines.\r\n  const indent = src[1] ? src[1].match(/^\\s*/)[0].length : 0;\r\n```\r\nat this point src is an array so `src[1]` matches the second line and not first char. Probably the bug is only apparent because on windows because `src[1]` points to an empty line (when parsing skatejs README)\r\n\r\nI did not tried a fix because i don't get the reason of this procedure. It's supposed to check the first text char and than if the char is blank, remove the some number of chars for each line. But what if next lines does not have the same indentation?"}}
{"actor":{"display_login":"blikblum"}}