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
Asciidoctor fails with asciidoctor style cells in tables with wrongly defined columns #1460
Comments
Could you post the sample AsciiDoc content as well?
|
Will do once I'm back at an ordinateur.
|
Thanks! That's what I was looking for. Just needed confirmation to make sure I was testing the right scenario. |
The example I mentioned before works.
Removing the |
I think I've got it sorted out with PR #1506. If a column can't be resolved when attempting to close a cell, skip the cell with a warning. The output of the table is still very likely to be empty or missing rows, but it's better than a crash. Asciidoctor doesn't attempt to recover a broken table if the actual number of columns (as a result of cells with colspan and rowspan) differs from the colspec. |
To be more clear, I opted for "skip cell and warn". Adding a default column is not really possible with the current parsing code. |
resolves #1460 don't crash if colspan exceeds colspec
When a table only defines 2 columns, but makes Asciidoctor detect 3 columns and a cell in the third column uses an asciidoctor style rendering fails with:
This is because in https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor/table.rb#L223 the column variable is
nil
.I cannot tell whether Asciidoctor should better
@document
is also nil.The text was updated successfully, but these errors were encountered: