{"action":"created","issue":{"url":"https://api.github.com/repos/rstacruz/markdown-it-decorate/issues/1","labels_url":"https://api.github.com/repos/rstacruz/markdown-it-decorate/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/rstacruz/markdown-it-decorate/issues/1/comments","events_url":"https://api.github.com/repos/rstacruz/markdown-it-decorate/issues/1/events","html_url":"https://github.com/rstacruz/markdown-it-decorate/issues/1","id":116126094,"number":1,"title":"pre and code tags?","user":{"login":"stereoplegic","id":5766814,"avatar_url":"https://avatars.githubusercontent.com/u/5766814?v=3","gravatar_id":"","url":"https://api.github.com/users/stereoplegic","html_url":"https://github.com/stereoplegic","followers_url":"https://api.github.com/users/stereoplegic/followers","following_url":"https://api.github.com/users/stereoplegic/following{/other_user}","gists_url":"https://api.github.com/users/stereoplegic/gists{/gist_id}","starred_url":"https://api.github.com/users/stereoplegic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereoplegic/subscriptions","organizations_url":"https://api.github.com/users/stereoplegic/orgs","repos_url":"https://api.github.com/users/stereoplegic/repos","events_url":"https://api.github.com/users/stereoplegic/events{/privacy}","received_events_url":"https://api.github.com/users/stereoplegic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-10T15:12:55Z","updated_at":"2015-11-11T18:19:43Z","closed_at":null,"body":"I noticed that neither this module, nor [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs) from which it is forked, support adding attributes to pre or code tags. \r\n\r\nI see that part of the issue, at least with fenced code blocks using triple backticks, is that a lang-... class is automatically added to the child code tag. Attempting to add the attributes to the top row of backticks results in **class=\"language-<!--\",** cutting off the rest e.g.:\r\n```\r\n\\``` <!-- {#blah} --> //turns <pre><code> into <pre><code class=\"language-<!--\">\r\nexampleCode();\r\n\\```\r\n```\r\n\r\nAdding the decorate tags anywhere else simply adds the full **<!-- {#blah} -->** to the markup: In the code block if added after the text, eg: \r\n```\r\n\\```\r\nexampleCode(); <!-- {#blah} --> //adds <!-- {#blah} --> to code's innerHTML\r\n\\```\r\n```\r\n\r\n or after the closing pre tag if added after the closing backticks, e.g.:\r\n```\r\n\\```\r\nexampleCode();\r\n\\``` <!-- {#blah} --> //adds <!-- {#blah} --> after </code></pre>\r\n```\r\nAre there any plans to support pre and code in the future?"},"comment":{"url":"https://api.github.com/repos/rstacruz/markdown-it-decorate/issues/comments/155866573","html_url":"https://github.com/rstacruz/markdown-it-decorate/issues/1#issuecomment-155866573","issue_url":"https://api.github.com/repos/rstacruz/markdown-it-decorate/issues/1","id":155866573,"user":{"login":"stereoplegic","id":5766814,"avatar_url":"https://avatars.githubusercontent.com/u/5766814?v=3","gravatar_id":"","url":"https://api.github.com/users/stereoplegic","html_url":"https://github.com/stereoplegic","followers_url":"https://api.github.com/users/stereoplegic/followers","following_url":"https://api.github.com/users/stereoplegic/following{/other_user}","gists_url":"https://api.github.com/users/stereoplegic/gists{/gist_id}","starred_url":"https://api.github.com/users/stereoplegic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereoplegic/subscriptions","organizations_url":"https://api.github.com/users/stereoplegic/orgs","repos_url":"https://api.github.com/users/stereoplegic/repos","events_url":"https://api.github.com/users/stereoplegic/events{/privacy}","received_events_url":"https://api.github.com/users/stereoplegic/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T18:19:43Z","updated_at":"2015-11-11T18:19:43Z","body":"Thanks @rstacruz.\r\n\r\nI'm sure you already know this, but inline `<code>` is still affected. The surrounding `<p>` tag can be targeted, but `<!-- {code: .blah} -->` does not."}}