{"action":"created","issue":{"url":"https://api.github.com/repos/bcosca/fatfree-core/issues/75","labels_url":"https://api.github.com/repos/bcosca/fatfree-core/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/bcosca/fatfree-core/issues/75/comments","events_url":"https://api.github.com/repos/bcosca/fatfree-core/issues/75/events","html_url":"https://github.com/bcosca/fatfree-core/issues/75","id":100806328,"number":75,"title":"template parsing single tag elements","user":{"login":"ikkez","id":1177647,"avatar_url":"https://avatars.githubusercontent.com/u/1177647?v=3","gravatar_id":"","url":"https://api.github.com/users/ikkez","html_url":"https://github.com/ikkez","followers_url":"https://api.github.com/users/ikkez/followers","following_url":"https://api.github.com/users/ikkez/following{/other_user}","gists_url":"https://api.github.com/users/ikkez/gists{/gist_id}","starred_url":"https://api.github.com/users/ikkez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikkez/subscriptions","organizations_url":"https://api.github.com/users/ikkez/orgs","repos_url":"https://api.github.com/users/ikkez/repos","events_url":"https://api.github.com/users/ikkez/events{/privacy}","received_events_url":"https://api.github.com/users/ikkez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bcosca/fatfree-core/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-13T16:01:33Z","updated_at":"2015-08-15T11:17:56Z","closed_at":"2015-08-13T23:06:58Z","body":"I noticed that the [Template->parse](http://fatfreeframework.com/template#parse) method could act a little bit weird when you have a [registered tag handler](http://fatfreeframework.com/template#extend) and have a html element in your markup that only has a starting tag, without being properly self-closed. \r\n\r\nThis **works**:\r\n```html\r\n<set key=\"val\" />\r\n```\r\nbut this **breaks** the markup:\r\n```html\r\n<set key=\"val\">\r\n```\r\n\r\nThis looks trivial and easy to solve by adding the `/ >` tag ending, but sometimes I don't recognize it immediately and this construct is eating up some of your subsequent html markup that just get lost. I have a tag handler on `<input>` fields, which are common, single tag elements that are HTML5 valid without being self-closed. \r\nI have no problem with adding the closing slash, but some skeleton frontend frameworks like h5bp, bootstrap, etc. are shipped with the simplified syntax `<input type=\"text\" name=\"search\">` and it isn't really reliable for plugin developers to force the rewrite of templates. \r\nI haven't found a fix for the [parse](https://github.com/bcosca/fatfree-core/blob/master/template.php#L270) method yet, but I can imagine that a bit juggling with `$stack` and `$depth` could do the trick.\r\n\t\r\n \r\n"},"comment":{"url":"https://api.github.com/repos/bcosca/fatfree-core/issues/comments/131354921","html_url":"https://github.com/bcosca/fatfree-core/issues/75#issuecomment-131354921","issue_url":"https://api.github.com/repos/bcosca/fatfree-core/issues/75","id":131354921,"user":{"login":"xfra35","id":1838531,"avatar_url":"https://avatars.githubusercontent.com/u/1838531?v=3","gravatar_id":"","url":"https://api.github.com/users/xfra35","html_url":"https://github.com/xfra35","followers_url":"https://api.github.com/users/xfra35/followers","following_url":"https://api.github.com/users/xfra35/following{/other_user}","gists_url":"https://api.github.com/users/xfra35/gists{/gist_id}","starred_url":"https://api.github.com/users/xfra35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfra35/subscriptions","organizations_url":"https://api.github.com/users/xfra35/orgs","repos_url":"https://api.github.com/users/xfra35/repos","events_url":"https://api.github.com/users/xfra35/events{/privacy}","received_events_url":"https://api.github.com/users/xfra35/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T11:17:56Z","updated_at":"2015-08-15T11:17:56Z","body":"If you rely on closing tags, will you still be able to handle nested tags?\r\n\r\nLike:\r\n```html\r\n<markdown>\r\n  <switch>\r\n    <case>...\r\n  </switch>\r\n</markdown>\r\n```\r\n\r\nand:\r\n\r\n```html\r\n<markdown src=\"home.md\">\r\n  <switch>\r\n    <case>...\r\n  </switch>\r\n```\r\n?"}}