-
Notifications
You must be signed in to change notification settings - Fork 689
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
Colspan fixes #620
Colspan fixes #620
Conversation
@hbrandl Note I've rebased your branch here into a single commit, but it's the same code. |
@hbrandl Sorry for the crazy rebasing and force-pushing. Check the files changed view now: I basically only made two changes:
The code in ColumnWidthCalculator is almost identical to what your original patch had, and it would benefit from being refactored further later. I'm also not necessarily committed to the names of anything in there. But I think it's a good idea for us to extract classes whenever a feature can mostly be handled in isolation, just to keep the existing classes from growing infinitely. We can contemplate proper design later. Let me know if it's looking good to now. |
table_data = [["a", "b", "c"], [{:content=>"d", :colspan=>3}]] | ||
column_widths = [50, 60, 400] | ||
|
||
# Before we fixed #407, this line incorrectly raise a CannotFit error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cheba, @bradediger Here's how I addressed the assertionless spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sandal, this looks great.
Talked to @hbrandl over IRC. I'm merging this now, but anyone is welcome to open up another pull request to clean it up further. |
Pots the following prs: prawnpdf#712 prawnpdf#620
Ports the following prs: prawnpdf#712 prawnpdf#620
Ports the following prs: prawnpdf#712 prawnpdf#620
This is a continuation of work done on #579, as we revise it and prepare it to be merged. It addresses table colspan calculation related issues reported in #407.