{"action":"created","issue":{"url":"https://api.github.com/repos/riot/riot/issues/1779","repository_url":"https://api.github.com/repos/riot/riot","labels_url":"https://api.github.com/repos/riot/riot/issues/1779/labels{/name}","comments_url":"https://api.github.com/repos/riot/riot/issues/1779/comments","events_url":"https://api.github.com/repos/riot/riot/issues/1779/events","html_url":"https://github.com/riot/riot/issues/1779","id":153877675,"number":1779,"title":"<yield> tag suddenly requires closing tag or slash","user":{"login":"joepie91","id":1663259,"avatar_url":"https://avatars.githubusercontent.com/u/1663259?v=3","gravatar_id":"","url":"https://api.github.com/users/joepie91","html_url":"https://github.com/joepie91","followers_url":"https://api.github.com/users/joepie91/followers","following_url":"https://api.github.com/users/joepie91/following{/other_user}","gists_url":"https://api.github.com/users/joepie91/gists{/gist_id}","starred_url":"https://api.github.com/users/joepie91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joepie91/subscriptions","organizations_url":"https://api.github.com/users/joepie91/orgs","repos_url":"https://api.github.com/users/joepie91/repos","events_url":"https://api.github.com/users/joepie91/events{/privacy}","received_events_url":"https://api.github.com/users/joepie91/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/riot/riot/labels/discussion","name":"discussion","color":"ff44aa"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-09T21:47:48Z","updated_at":"2016-05-10T16:35:22Z","closed_at":null,"body":"In previous versions (eg. [`2.2.4`](https://github.com/riot/riot/blob/7133e953a37ca44d574b39c25527ab7ccb1d50e3/riot%2Bcompiler.js#L1143)), a `<yield>` tag (without self-closing slash!) would be valid. However, in the newest version, `2.4.0`, this is no longer possible - it now [requires a closing tag or self-closing slash](https://github.com/riot/riot/blob/v2.4.0/riot%2Bcompiler.js#L969).\r\n\r\nIn the case that this was an intentional change (although, presumably, outside of XHTML it should be valid to omit the closing slash or tag), this is essentially a (currently) undocumented breaking change, and should be clearly documented as such.\r\n\r\nThis change was seemingly introduced in `2.3.16`. Previous versions did not have a `reYieldAll` regex defined.\r\n\r\n__How would you tag this issue:__ Bug.\r\n"},"comment":{"url":"https://api.github.com/repos/riot/riot/issues/comments/218215458","html_url":"https://github.com/riot/riot/issues/1779#issuecomment-218215458","issue_url":"https://api.github.com/repos/riot/riot/issues/1779","id":218215458,"user":{"login":"joepie91","id":1663259,"avatar_url":"https://avatars.githubusercontent.com/u/1663259?v=3","gravatar_id":"","url":"https://api.github.com/users/joepie91","html_url":"https://github.com/joepie91","followers_url":"https://api.github.com/users/joepie91/followers","following_url":"https://api.github.com/users/joepie91/following{/other_user}","gists_url":"https://api.github.com/users/joepie91/gists{/gist_id}","starred_url":"https://api.github.com/users/joepie91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joepie91/subscriptions","organizations_url":"https://api.github.com/users/joepie91/orgs","repos_url":"https://api.github.com/users/joepie91/repos","events_url":"https://api.github.com/users/joepie91/events{/privacy}","received_events_url":"https://api.github.com/users/joepie91/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T16:35:22Z","updated_at":"2016-05-10T16:35:22Z","body":"I've looked at the HTML5 specification, and I can't find anything that allows for custom foreign elements *at all*, so in that sense we might already be violating the specification. There's an [Angular thread](https://github.com/angular/angular/issues/5563#issuecomment-161826319) that argues:\r\n\r\n> custom element spec currently doesn't allow custom elements to be self-closing or void\r\n\r\n... but this does not seem practical. In the end, accepting only self-closing tags *may* be the right approach here (in the interest of distinguishing between void and non-void tags, since they are custom tags and so the browser can't know), but in this case it would *still* need to be documented, which it currently isn't.\r\n\r\nRegardless of whether it was intended to require a self-closing slash, it *is* a breaking change to suddenly require it, and sent me off on a wild goose hunt yesterday to work out why my `yield` suddenly failed to work. It should at the very least be noted in the changelog (preferably with an explicit note in the documentation too), and according to semantic versioning, this kind of change might require a bump in major version.\r\n\r\nI do expect more of these kind of issues to crop up in the future, given that Riot tries to parse HTML with regex, rather than with an actual HTML parser."}}