-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[markdown writer] Empty columns in table when first row has only one column #3337
Comments
The difference is that in "issue" the header row just has one (empty) cell, while in "passed" it has (as it should) three empty cells. (EDIT: also, in "issue" the first body row has just one cell, while in "passed" it has three, two of them empty.) So there are two questions:
|
@jkr I think I see now. In the docx file, the first table row (header row) has just one And indeed, the reader gives output similar to the output the HTML reader gives on
So I think the problem is really just with the markdown writer. |
On second look, it's a bit more complex. @jkr In general, when widths and alignments are not explicitly specified, the readers take them from the headers. So, for example,
Here we have alignments and widths for only one column, though the second row has two. (Indeed, the markdown reader goes farther than the HTML or docx readers, and actually truncates the second row.) Similarly
Ideally we'd get alignments and widths for all columns, from every reader. That would be the best solution but would require interventions in most or all readers. (docx, html, markdown all behave the same in this respect.) Given that we don't, we could work around this in the markdown writer by padding rows that are "light" relative to the longest row, and padding the alignments and widths too. But I'm not positive this wouldn't have some weird effects. |
This looks like an issue in markdown writer.
The file issue.docx when converted to markdown with pandoc-1.19 has the following output:
while the expected one is:
(generated from converting file passed.docx).
It seems like the docx reader is getting the data right as the rst writer's output for issue.docx is like expected:
Thank you for your consideration.
passed.docx
issue.docx
The text was updated successfully, but these errors were encountered: