{"action":"created","issue":{"url":"https://api.github.com/repos/wooorm/mdast/issues/6","repository_url":"https://api.github.com/repos/wooorm/mdast","labels_url":"https://api.github.com/repos/wooorm/mdast/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/wooorm/mdast/issues/6/comments","events_url":"https://api.github.com/repos/wooorm/mdast/issues/6/events","html_url":"https://github.com/wooorm/mdast/issues/6","id":131616743,"number":6,"title":"Drop the `TableHeader` node","user":{"login":"wooorm","id":944406,"avatar_url":"https://avatars.githubusercontent.com/u/944406?v=3","gravatar_id":"","url":"https://api.github.com/users/wooorm","html_url":"https://github.com/wooorm","followers_url":"https://api.github.com/users/wooorm/followers","following_url":"https://api.github.com/users/wooorm/following{/other_user}","gists_url":"https://api.github.com/users/wooorm/gists{/gist_id}","starred_url":"https://api.github.com/users/wooorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wooorm/subscriptions","organizations_url":"https://api.github.com/users/wooorm/orgs","repos_url":"https://api.github.com/users/wooorm/repos","events_url":"https://api.github.com/users/wooorm/events{/privacy}","received_events_url":"https://api.github.com/users/wooorm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wooorm/mdast/labels/concept","name":"concept","color":"657b83"},{"url":"https://api.github.com/repos/wooorm/mdast/labels/question","name":"question","color":"2aa198"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-05T11:15:52Z","updated_at":"2016-02-06T14:32:55Z","closed_at":null,"body":"There’s no need to distinguish between table-headers and table-rows, as *all* markdown tables contain a single header row."},"comment":{"url":"https://api.github.com/repos/wooorm/mdast/issues/comments/180775007","html_url":"https://github.com/wooorm/mdast/issues/6#issuecomment-180775007","issue_url":"https://api.github.com/repos/wooorm/mdast/issues/6","id":180775007,"user":{"login":"wooorm","id":944406,"avatar_url":"https://avatars.githubusercontent.com/u/944406?v=3","gravatar_id":"","url":"https://api.github.com/users/wooorm","html_url":"https://github.com/wooorm","followers_url":"https://api.github.com/users/wooorm/followers","following_url":"https://api.github.com/users/wooorm/following{/other_user}","gists_url":"https://api.github.com/users/wooorm/gists{/gist_id}","starred_url":"https://api.github.com/users/wooorm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wooorm/subscriptions","organizations_url":"https://api.github.com/users/wooorm/orgs","repos_url":"https://api.github.com/users/wooorm/repos","events_url":"https://api.github.com/users/wooorm/events{/privacy}","received_events_url":"https://api.github.com/users/wooorm/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T14:32:54Z","updated_at":"2016-02-06T14:32:54Z","body":"> Could you expand on this? As I see, compilers can either compile the `table` node as a whole and use `children[0]` and `children.slice(1)` or compile table-headers and table-rows separately. In the first case there's no reason to check child types at all (`remark-html` doesn't do that) and so using different node types for headers and rows doesn't change anything. Am I missing something?\r\n\r\nI meant that its possible for an AST to have two `tableHeader`s, or none at all, or first a `tableRow`, then a `tableHeader`. Thus, plug-ins will decide on how they handle malformed ASTs, probably each with a different solution. If there’s a single node type for table rows, there’s no way to produce malformed trees, and thus no way to incorrectly compile them.\r\n\r\n> In the second case (compiling table-headers and table-rows) compilers could benefit from removing `tableHeader` type so that they could have a single compiler for `tableRow` and switch by `index` where needed (but they can also assign the same handler for `tableHeader` and check the type so this is not a compelling reason IMO).\r\n\r\nNo, it’s not very compelling, indeed. My feeling is that it’s prettier to use `index == 0` over a node-type for such a small difference though, a bit like the `heading`s `depth`. Come to think, what about a property? Or is that too verbose?\r\n\r\n> Re multiline headers: multiline headings (not the same thing, but close) [could be coming](http://spec.commonmark.org/0.24/#example-67) in future versions of Commonmark:\r\n\r\nOh wow, didn’t see that one coming. Not sure if they’ll ever implement it though. But it’s good to keep in mind!\r\nAnd, yeah I walking about table header rows :wink:\r\n\r\nGenerally, are you in favour of changing this? I think we now they up- and downsides now, and I’d say one less node-type is for the better!"}}