-
-
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
Unexpected Legacy Table output #7683
Comments
I think this concerns |
@despresc wrote this code and might be able to explain whether this behavior is intended. |
It is not intended. What you expected should be what pandoc outputs. I've fixed the issue in the pull request I just created. |
As some kind of epilogue: I've recently tested your fix against a few thousand (pseudo)randomly generated tables, ranging from about 6 000 to 13 000 cells each, with random row spans and col spans... And there were no errors. (where versions before the fix all failed the test) Just see this as an independent "stress test" (with my own 'bean counter') that went beyond a few manual tests. (of course, a multitude of positive tests doesn't give absolute certitude, but it's enough for me to go on from here... thank you again.) |
It's no problem. Thanks for the testing as well. |
The following can be verified on the online demo, as well as recent pandoc release.
Consider the following table:
A browser would render it to something that looks like this:
A markdown output by pandoc (through its
SimpleTable
) will output this legacy style grid:(custom writer and
to_simple_table
in Lua filters will get the same result)However, I expected this instead:
So I don't know why the "e" was moved to an adjacent cell.
That is, I expected merged cells of rowspan = rs and colspan = cs to be rendered as rs * cs cells of 1x1 dimension, where the content would be put in the top-left cell, with the other cells empty and put on the grid "naturally", and non merged cells to be where they are expected to be.
If this is not a bug, is there some rule to predict the position of cells in Legacy mode (for a non-Haskell coder) ?
I can compensate with some methods to get the kind of grid I expect, but getting it from pandoc would simplify things.
Additional reference: The above example comes from a simplified version of this table with which I was doing some tests (custom writer that outputs complex grid tables). If you force pandoc to do a grid representation, you'll get the same problem I described above.
The text was updated successfully, but these errors were encountered: