prawnpdf / prawn-table

Provides support for tables in Prawn
Other
205 stars 98 forks source link

Keep more specific cell styling instead of it being overwritten by the table cell_style #143

Closed petergoldstein closed 2 years ago

petergoldstein commented 2 years ago

This is a rebased and updated version of #59, which addressed #56.

Thanks to @russellsanders for the original contribution.

@pointlessone I believe this can be merged. Can you please take a look?

petergoldstein commented 2 years ago

@pointlessone Review issues have been addressed, so this is likely ready for merge.

mojavelinux commented 2 years ago

This is a significant breaking change which affects Asciidoctor PDF. The problem is that the :cell_style option on the table no longer gets applied to each custom cell implementation. Before, setting :cell_style would be passed to cell_style=, which in turn would be passed to cells.style. That no longer happens, and make_cells does not pass options to a cell that's already been constructed. So, essentially, the code path has changed.

I can likely find a way to work around it (see https://github.com/asciidoctor/asciidoctor-pdf/commit/9d301228d4e83b3c0a218b3a04beeaaaa8c1dc04), but I just wanted you to be aware that the change does break widely used code when you decide how to version the release.