puzzle / prawn-markup

Parse simple HTML markup to include in Prawn PDFs
MIT License
65 stars 16 forks source link

Adds support for core Prawn's 'HTML-esque' color tag #29

Closed allthesignals closed 2 years ago

allthesignals commented 2 years ago

Addresses #15 by enabling support for Prawn core's <color></color> "HTML-esque" tag.

A few things I'm concerned about here:

  1. I'm not sure I put these new methods (#start_color #end_color) in the best place. Does it make sense to translate non-HTML this way?
  2. Not sure how best to test this either, but I'm looking at ways to improve this...

Thanks!

Here's some manual output to show this actually seems to work...

test.pdf

codez commented 2 years ago

Looks good to me. I do not know how to test colored text either.

Prawns color tag also supports cmyk: "and CMYK" Do you think you could integrate this? Adding the color tag to the text semantics list in the Readme would be great, too.

I adjusted the build.yml hoping to get the checks working for the pull requests, too.

allthesignals commented 2 years ago

Looks good to me. I do not know how to test colored text either.

Prawns color tag also supports cmyk: "and CMYK" Do you think you could integrate this? Adding the color tag to the text semantics list in the Readme would be great, too.

I adjusted the build.yml hoping to get the checks working for the pull requests, too.

Thanks for the feedback. Yeah! I just pushed up a change. Not sure it's the most "rubyist" way. Let me know if there's a more preferred way to deal with hash destructuring :)

codez commented 2 years ago

Great, thank you for your contribution!

codez commented 2 years ago

I managed to get the checks running. Once rubocop is happy, I will merge your request.

allthesignals commented 2 years ago

Thanks, @codez! Fixed the linting issues. I saw code coverage check failed but seemed to be a configuration issue.

allthesignals commented 2 years ago

Hi @codez any other feedback?

codez commented 2 years ago

Thank you for the contribution!