-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tables: <tbody>tag should be omitted when table has no body rows #138
Comments
I agree the HTML output should not exhibit the empty That said, I'm wondering whether the parser should not call the application-provided callback with I'm mostly concerned about custom (non-HTML) renderers and what's better in general. I tend to think that some renderers might assume that for every table we call those, and could break if we do not. Anyone has an opinion about what's better? (In retrospect, I also think that naming all the |
I see you already made this decision, but I wanted to offer some thought on the last point:
I don't think that's such a bad thing. The blocks do follow HTML semantics. By that I mean table blocks use an HTML-like structure, where header rows are wrapped by a special header block and body rows are wrapped by a body block. I could imagine an alternate implementation where, instead of having header and body containers, there's a separator node that delimits the end of the header rows. (This would be closer to what e.g. LaTeX does, where header rows aren't special, but you normally put a double or bold line between them and the body.) I suppose there could be debate over what semantics would be the most renderer-agnostic, but I think the HTML semantics do a pretty good job there (and the Markdown spec itself is clearly biased toward HTML semantics, maybe not w.r.t tables, but in other ways). These are semantics that most people should already be familiar with, and using the HTML names serves as self-documentation that yes, table headings wrapped in a heading block is the structure used, not something else. |
(from #136, to make one report per individual issue)
Example 205:
<tbody>
tags must be omitted when the table has no body rows.GFM Spec:
MD4C:
The text was updated successfully, but these errors were encountered: