Skip to content
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

Calculate multiline text cell width and add nowrap option #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

J-F-Liu
Copy link

@J-F-Liu J-F-Liu commented Aug 5, 2015

No description provided.

@packetmonkey
Copy link
Contributor

So far this looks good. Can you please add a couple of specs to ensure that the behavior with and without nowrap will continue to work correctly?

Thanks!

@andyjeffries
Copy link

@pointlessone is there any reason this can't be merged? (tagging you because you seem to be the person who commits most here).

I really need this functionality for my project. I can use a fork, but I'd rather help (if needed) test this fix and get it in the mainline.

@gettalong
Copy link
Member

@andyjeffries When you look at the code of the pull request, you can see that there are no tests and no documentation. So once someone has the time to add those and make sure the current behaviour still works as before, the maintainers can have another look at it.

@andyjeffries
Copy link

Thanks @gettalong, I don't know the codebase but I'm trying to get in to this.

I've just checked current master though and it fails for me:

11:07 ~/Developer/vendor/prawn-table (master ✗) $ git pull -r
Already up to date.
11:07 ~/Developer/vendor/prawn-table (master ✗) $ bundle exec rspec
Prawn specs: Running on Ruby Version: 3.0.4
........................................................................F............................................................................................................................................................

Failures:

  1) Prawn::Table Prints table on one page when using subtable with colspan > 1
     Failure/Error: expect(pdf.page_count).to eq 1

       expected: 1
            got: 2

       (compared using ==)
     # ./spec/table_spec.rb:1322:in `block (2 levels) in <top (required)>'

Finished in 0.91638 seconds (files took 0.12048 seconds to load)
229 examples, 1 failure

Failed examples:

rspec ./spec/table_spec.rb:1299 # Prawn::Table Prints table on one page when using subtable with colspan > 1

So I'll ignore that one spec failure and work on making sure the other current specs pass and new ones are added for this feature.

andyjeffries added a commit to andyjeffries/prawn-table that referenced this pull request Sep 9, 2022
Based almost entirely on:

prawnpdf#50

Implements the wrapping, adds no more failures (than the current master fails on 3.0.4 anyway), but adds new tests and documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants