{"action":"opened","issue":{"url":"https://api.github.com/repos/Talesoft/tale-jade/issues/2","labels_url":"https://api.github.com/repos/Talesoft/tale-jade/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Talesoft/tale-jade/issues/2/comments","events_url":"https://api.github.com/repos/Talesoft/tale-jade/issues/2/events","html_url":"https://github.com/Talesoft/tale-jade/issues/2","id":109789934,"number":2,"title":"Switch other HTML modes correctly based on doctype","user":{"login":"TorbenKoehn","id":1403556,"avatar_url":"https://avatars.githubusercontent.com/u/1403556?v=3","gravatar_id":"","url":"https://api.github.com/users/TorbenKoehn","html_url":"https://github.com/TorbenKoehn","followers_url":"https://api.github.com/users/TorbenKoehn/followers","following_url":"https://api.github.com/users/TorbenKoehn/following{/other_user}","gists_url":"https://api.github.com/users/TorbenKoehn/gists{/gist_id}","starred_url":"https://api.github.com/users/TorbenKoehn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TorbenKoehn/subscriptions","organizations_url":"https://api.github.com/users/TorbenKoehn/orgs","repos_url":"https://api.github.com/users/TorbenKoehn/repos","events_url":"https://api.github.com/users/TorbenKoehn/events{/privacy}","received_events_url":"https://api.github.com/users/TorbenKoehn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-05T12:53:57Z","updated_at":"2015-10-05T12:53:57Z","closed_at":null,"body":"Right now the `Compiler` just differs between HTML and XML Mode.\r\n\r\nIn XML-Mode it will avoid stuff like automatic class/style assignment based on attribute names and it wont try to self-closing attributes like input, img etc. closed\r\n\r\nCurrently, the Compiler actually supports only HTML5 and XML.\r\n\r\nXML Mode reacts on the doctype already.\r\n\r\nTODO:\r\n- Remove the Compiler MODE_* constants\r\n- Remove `$this->_options['mode']`\r\n- Add `private $_mode` to compiler\r\n- Set `5` as the default mode\r\n- Automatically detect `$_mode` based on found `doctype`-nodes\r\n\r\nIf mode is HTML5:\r\n- Automatically assign class/style values\r\n- Don't close self-closing elements like link, input, img, br etc.\r\n\r\nIf mode is XML:\r\n- Do nothing of the above\r\n- Make sure every tag is closed with either /> or a closing tag\r\n\r\nIf mode is XHTML\r\n- Do everything what HTML5 does, but rather don't keep self-closed elements open, close them with />\r\n\r\nHandle other doctypes optionally"}}