{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/10200","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/10200/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/10200/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/10200/events","html_url":"https://github.com/WordPress/gutenberg/issues/10200","id":364116076,"node_id":"MDU6SXNzdWUzNjQxMTYwNzY=","number":10200,"title":"Markdown code-block pasting loses `code` language information.","user":{"login":"davidbhayes","id":2613891,"node_id":"MDQ6VXNlcjI2MTM4OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2613891?v=4","gravatar_id":"","url":"https://api.github.com/users/davidbhayes","html_url":"https://github.com/davidbhayes","followers_url":"https://api.github.com/users/davidbhayes/followers","following_url":"https://api.github.com/users/davidbhayes/following{/other_user}","gists_url":"https://api.github.com/users/davidbhayes/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbhayes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbhayes/subscriptions","organizations_url":"https://api.github.com/users/davidbhayes/orgs","repos_url":"https://api.github.com/users/davidbhayes/repos","events_url":"https://api.github.com/users/davidbhayes/events{/privacy}","received_events_url":"https://api.github.com/users/davidbhayes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-26T16:34:49Z","updated_at":"2018-09-26T16:39:13Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\nWhen I paste markdown, I like/expect that the a language specified after the start of a backtick fence will be converted into a CSS class about the language specified. So if I start the block like ``` ```php ``` I expect to see a `<code class=\"language-php\"> in the block`. This isn't happening. \r\n\r\nHere's a CommonMark spec/test about the behavior that matches my expectations: https://spec.commonmark.org/0.28/#example-111\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Open Gutenberg editor\r\n2. Paste code like \r\n```   \r\n```php\r\n<?php\r\n\r\n$random = 'what';\r\n\\`\\`\\`\r\n   ```\r\n\r\n3. See that there is not a \"language-php\" class applied to that code block by default.\r\n\r\n**Expected behavior**\r\nThat the `language-php` or similar is honored and applied as a class to either the internal `code` block (like the CommonMark` spec) or even to the outer `pre` black.\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: macOS\r\n - Browser: Firefox\r\n - Version 62.0.2\r\n\r\n**Additional context**\r\n- Noticed while using Gutenberg 3.9\r\n- I know there are lots of \"dialects\" of Markdown. And I'm confident that both the CommonMark standard and \"GitHub Flavored Markdown\" ([link about that](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown)) specify the behavior described above.\r\n"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/424786213","html_url":"https://github.com/WordPress/gutenberg/issues/10200#issuecomment-424786213","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/10200","id":424786213,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDc4NjIxMw==","user":{"login":"davidbhayes","id":2613891,"node_id":"MDQ6VXNlcjI2MTM4OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/2613891?v=4","gravatar_id":"","url":"https://api.github.com/users/davidbhayes","html_url":"https://github.com/davidbhayes","followers_url":"https://api.github.com/users/davidbhayes/followers","following_url":"https://api.github.com/users/davidbhayes/following{/other_user}","gists_url":"https://api.github.com/users/davidbhayes/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbhayes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbhayes/subscriptions","organizations_url":"https://api.github.com/users/davidbhayes/orgs","repos_url":"https://api.github.com/users/davidbhayes/repos","events_url":"https://api.github.com/users/davidbhayes/events{/privacy}","received_events_url":"https://api.github.com/users/davidbhayes/received_events","type":"User","site_admin":false},"created_at":"2018-09-26T16:39:13Z","updated_at":"2018-09-26T16:39:13Z","author_association":"NONE","body":"It's hard to properly show a Markdown code block inside of a Markdown code block."}}
{"actor":{"display_login":"davidbhayes"}}