{"action":"closed","issue":{"url":"https://api.github.com/repos/markdown-it/markdown-it-container/issues/16","repository_url":"https://api.github.com/repos/markdown-it/markdown-it-container","labels_url":"https://api.github.com/repos/markdown-it/markdown-it-container/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/markdown-it/markdown-it-container/issues/16/comments","events_url":"https://api.github.com/repos/markdown-it/markdown-it-container/issues/16/events","html_url":"https://github.com/markdown-it/markdown-it-container/issues/16","id":244949686,"number":16,"title":"how could I custome the tag name","user":{"login":"scil","id":2786775,"avatar_url":"https://avatars2.githubusercontent.com/u/2786775?v=4","gravatar_id":"","url":"https://api.github.com/users/scil","html_url":"https://github.com/scil","followers_url":"https://api.github.com/users/scil/followers","following_url":"https://api.github.com/users/scil/following{/other_user}","gists_url":"https://api.github.com/users/scil/gists{/gist_id}","starred_url":"https://api.github.com/users/scil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scil/subscriptions","organizations_url":"https://api.github.com/users/scil/orgs","repos_url":"https://api.github.com/users/scil/repos","events_url":"https://api.github.com/users/scil/events{/privacy}","received_events_url":"https://api.github.com/users/scil/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-24T01:05:31Z","updated_at":"2017-07-24T11:47:40Z","closed_at":"2017-07-24T11:47:40Z","body":"I want to control the tag name of rendered html, e.g. z-deep/section instead of div.\r\n\r\n```\r\n        .use(require('markdown-it-container'), 'decorate' , {\r\n            validate: function(params) {\r\n                return params.trim().match(/^(z-deep|section)$/);\r\n            },\r\n\r\n            render: function (tokens, idx) {\r\n                var m = tokens[idx].info.trim().match(/^(z-deep|section)$/);\r\n\r\n                var tag=m[1]||'div';\r\n\r\n                if (tokens[idx].nesting === 1) {\r\n                    // opening tag\r\n\r\n                    return '<' + tag  + ' >\\n';\r\n\r\n                } else {\r\n                    // closing tag\r\n                    console.log('tag ',tag)\r\n                    return '</'+tag+'>\\n';\r\n                }\r\n            }\r\n```\r\n\r\nbut the closing tag always is 'div', for example\r\n```\r\n::: z-deep\r\nok\r\n:::\r\n```\r\noutput:\r\n```\r\n<z-deep>\r\n<p>ok</p>\r\n</div>\r\n```\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"puzrin"}}