{"action":"created","issue":{"url":"https://api.github.com/repos/mivok/markdownlint/issues/106","labels_url":"https://api.github.com/repos/mivok/markdownlint/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/mivok/markdownlint/issues/106/comments","events_url":"https://api.github.com/repos/mivok/markdownlint/issues/106/events","html_url":"https://github.com/mivok/markdownlint/issues/106","id":103653841,"number":106,"title":"MD014 does not warn for fenced code blocks (just indented ones)","user":{"login":"DavidAnson","id":1828270,"avatar_url":"https://avatars.githubusercontent.com/u/1828270?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidAnson","html_url":"https://github.com/DavidAnson","followers_url":"https://api.github.com/users/DavidAnson/followers","following_url":"https://api.github.com/users/DavidAnson/following{/other_user}","gists_url":"https://api.github.com/users/DavidAnson/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidAnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidAnson/subscriptions","organizations_url":"https://api.github.com/users/DavidAnson/orgs","repos_url":"https://api.github.com/users/DavidAnson/repos","events_url":"https://api.github.com/users/DavidAnson/events{/privacy}","received_events_url":"https://api.github.com/users/DavidAnson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mivok/markdownlint/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mivok/markdownlint/labels/rule%20update","name":"rule update","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-28T06:07:08Z","updated_at":"2015-09-06T22:21:57Z","closed_at":null,"body":"See DavidAnson/markdownlint@5e3d9f8df420a2b340fbfa97146eec916f9676eb for a test file that I expect to trigger MD014 in the Ruby implementation but that does not.\r\n\r\nIn this case, one could argue whether MD014 should be applied to the first line of the fenced code block or the first line of its content. I chose the first line of the block because that seemed to match the spirit of the rule (i.e., it isn't meant to trigger for each '$' violation), but I could be convinced to change that if you feel otherwise."},"comment":{"url":"https://api.github.com/repos/mivok/markdownlint/issues/comments/138132588","html_url":"https://github.com/mivok/markdownlint/issues/106#issuecomment-138132588","issue_url":"https://api.github.com/repos/mivok/markdownlint/issues/106","id":138132588,"user":{"login":"mivok","id":60603,"avatar_url":"https://avatars.githubusercontent.com/u/60603?v=3","gravatar_id":"","url":"https://api.github.com/users/mivok","html_url":"https://github.com/mivok","followers_url":"https://api.github.com/users/mivok/followers","following_url":"https://api.github.com/users/mivok/following{/other_user}","gists_url":"https://api.github.com/users/mivok/gists{/gist_id}","starred_url":"https://api.github.com/users/mivok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mivok/subscriptions","organizations_url":"https://api.github.com/users/mivok/orgs","repos_url":"https://api.github.com/users/mivok/repos","events_url":"https://api.github.com/users/mivok/events{/privacy}","received_events_url":"https://api.github.com/users/mivok/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T22:21:57Z","updated_at":"2015-09-06T22:21:57Z","body":"Hi David,\r\n\r\nThis appears to be because kramdown parses a fenced code block such as:\r\n\r\n    ```\r\n    $ foo\r\n    ```\r\n\r\nas a codeblock with the contents `\"$ foo\\n\"`, meaning there is a final, blank, line that causes markdownlint to think that there is output after the command when in fact there isn't.\r\n\r\nThe simplest fix for this is for me to ignore any blank lines (matching `/^$/` as consisting of non-command output), or I can simply strip off any trailing blank line.\r\n\r\nWhich leads me to a question for you: what do you think of the following code block, should it trigger MD014?\r\n\r\n    ```\r\n    $ some command\r\n\r\n    $ some command\r\n\r\n    $ some command\r\n    ```"}}