{"action":"created","issue":{"url":"https://api.github.com/repos/pugjs/jade/issues/2196","labels_url":"https://api.github.com/repos/pugjs/jade/issues/2196/labels{/name}","comments_url":"https://api.github.com/repos/pugjs/jade/issues/2196/comments","events_url":"https://api.github.com/repos/pugjs/jade/issues/2196/events","html_url":"https://github.com/pugjs/jade/issues/2196","id":123758733,"number":2196,"title":"Define tag type using code","user":{"login":"diginfo","id":6010010,"avatar_url":"https://avatars.githubusercontent.com/u/6010010?v=3","gravatar_id":"","url":"https://api.github.com/users/diginfo","html_url":"https://github.com/diginfo","followers_url":"https://api.github.com/users/diginfo/followers","following_url":"https://api.github.com/users/diginfo/following{/other_user}","gists_url":"https://api.github.com/users/diginfo/gists{/gist_id}","starred_url":"https://api.github.com/users/diginfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diginfo/subscriptions","organizations_url":"https://api.github.com/users/diginfo/orgs","repos_url":"https://api.github.com/users/diginfo/repos","events_url":"https://api.github.com/users/diginfo/events{/privacy}","received_events_url":"https://api.github.com/users/diginfo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-24T05:01:59Z","updated_at":"2015-12-24T10:26:20Z","closed_at":null,"body":"Hi;\r\n\r\nI've tried all the syntax methods I can think of but can't seem to crack this.\r\n\r\nI would like to be able to define the tagName via code, I know this works:\r\n\r\n    #[a()&attributes({href:'#'})]\r\n\r\nBut how can I define the tag programatically:\r\n\r\n      -\r\n        var mytag = {\r\n          tag: 'a',\r\n          attr: { href:'#', alt:'xxx'}\r\n        }\r\n    #[=mytag.tag()&attributes(=mytag.attr)]\r\n\r\nObviously this does not work, but can this be done ?\r\n"},"comment":{"url":"https://api.github.com/repos/pugjs/jade/issues/comments/167086630","html_url":"https://github.com/pugjs/jade/issues/2196#issuecomment-167086630","issue_url":"https://api.github.com/repos/pugjs/jade/issues/2196","id":167086630,"user":{"login":"netlovers","id":1451148,"avatar_url":"https://avatars.githubusercontent.com/u/1451148?v=3","gravatar_id":"","url":"https://api.github.com/users/netlovers","html_url":"https://github.com/netlovers","followers_url":"https://api.github.com/users/netlovers/followers","following_url":"https://api.github.com/users/netlovers/following{/other_user}","gists_url":"https://api.github.com/users/netlovers/gists{/gist_id}","starred_url":"https://api.github.com/users/netlovers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netlovers/subscriptions","organizations_url":"https://api.github.com/users/netlovers/orgs","repos_url":"https://api.github.com/users/netlovers/repos","events_url":"https://api.github.com/users/netlovers/events{/privacy}","received_events_url":"https://api.github.com/users/netlovers/received_events","type":"User","site_admin":false},"created_at":"2015-12-24T10:26:20Z","updated_at":"2015-12-24T10:26:20Z","body":"How about this?\r\n```jade\r\n-\r\n  var mytag = {\r\n    tag: 'a',\r\n    attr: { href:'#', alt:'xxx'}\r\n  }\r\n#{mytag.tag}()&attributes(mytag.attr)\r\n```"}}