{"action":"created","issue":{"url":"https://api.github.com/repos/markedjs/marked/issues/1237","repository_url":"https://api.github.com/repos/markedjs/marked","labels_url":"https://api.github.com/repos/markedjs/marked/issues/1237/labels{/name}","comments_url":"https://api.github.com/repos/markedjs/marked/issues/1237/comments","events_url":"https://api.github.com/repos/markedjs/marked/issues/1237/events","html_url":"https://github.com/markedjs/marked/issues/1237","id":316688847,"number":1237,"title":"GFM doesn't handle escaped pipes in code blocks","user":{"login":"tomtheisen","id":2049910,"avatar_url":"https://avatars3.githubusercontent.com/u/2049910?v=4","gravatar_id":"","url":"https://api.github.com/users/tomtheisen","html_url":"https://github.com/tomtheisen","followers_url":"https://api.github.com/users/tomtheisen/followers","following_url":"https://api.github.com/users/tomtheisen/following{/other_user}","gists_url":"https://api.github.com/users/tomtheisen/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtheisen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtheisen/subscriptions","organizations_url":"https://api.github.com/users/tomtheisen/orgs","repos_url":"https://api.github.com/users/tomtheisen/repos","events_url":"https://api.github.com/users/tomtheisen/events{/privacy}","received_events_url":"https://api.github.com/users/tomtheisen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-23T07:13:03Z","updated_at":"2018-04-23T12:25:20Z","closed_at":null,"author_association":"NONE","body":"**Marked version:** 0.3.19\r\n\r\n**Markdown flavor:** GitHub Flavored Markdown\r\n\r\n## Expectation\r\n\r\nI expect that pipes will be parsed in accordance with the GFM specification, such as [example 193](https://github.github.com/gfm/#example-193).  It's labeled \"Include a pipe in a cell’s content by escaping it, including inside other inline spans:\".  The example indicates that you can include a pipe in a code block in a table by escaping it with a backslash.\r\n\r\n## Result\r\n\r\n```\r\n| f\\|oo  |\r\n| ------ |\r\n| b `\\|` az |\r\n| b **\\|** im |\r\n```\r\n\r\nWhen rendering this document with GFM turned on, the pipes in the code blocks actually create new table cells.\r\n\r\n**Marked Demo:** https://codepen.io/recursive/pen/yjeBVW - I didn't use marked.js.org because I couldn't see how to turn on GFM from there.\r\n\r\n## What was attempted\r\n\r\nHere's the code I'm using.\r\n\r\n```\r\nlet m = \"| f\\|oo  |\\n| ------ |\\n| b `\\|` az |\\n| b **\\|** im | \\n\";\r\nmarked.setOptions({gfm: true});\r\nlet h = marked(m);\r\ndocument.getElementById(\"out\").innerHTML = h;\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/markedjs/marked/issues/comments/383556624","html_url":"https://github.com/markedjs/marked/issues/1237#issuecomment-383556624","issue_url":"https://api.github.com/repos/markedjs/marked/issues/1237","id":383556624,"user":{"login":"joshbruce","id":15252830,"avatar_url":"https://avatars3.githubusercontent.com/u/15252830?v=4","gravatar_id":"","url":"https://api.github.com/users/joshbruce","html_url":"https://github.com/joshbruce","followers_url":"https://api.github.com/users/joshbruce/followers","following_url":"https://api.github.com/users/joshbruce/following{/other_user}","gists_url":"https://api.github.com/users/joshbruce/gists{/gist_id}","starred_url":"https://api.github.com/users/joshbruce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshbruce/subscriptions","organizations_url":"https://api.github.com/users/joshbruce/orgs","repos_url":"https://api.github.com/users/joshbruce/repos","events_url":"https://api.github.com/users/joshbruce/events{/privacy}","received_events_url":"https://api.github.com/users/joshbruce/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T12:25:20Z","updated_at":"2018-04-23T12:25:20Z","author_association":"OWNER","body":"@tomtheisen: Thanks for submitting and including an example from the spec.\r\n\r\nConfirmed.\r\n\r\nSee 'GFM 0.28 Tables' test suite https://github.com/markedjs/marked/blob/master/test/specs/gfm/gfm-spec.js\r\n\r\nNote that 193 is a known failure. The most timely solution would be to submit a PR, if you are able."}}
{"actor":{"display_login":"joshbruce"}}