puzzle / prawn-markup

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

Fix to issue_38 #39

Closed pet1100 closed 2 years ago

pet1100 commented 2 years ago

Looks at the width of all bullets instead of the last.

codez commented 2 years ago

Thank you for the pull request. This bug is a good catch ;)

I am thinking of adding a regression test and probably an optimization so that not all numbers have to be iterated for large lists. Also, for unordered lists, the iteration is not required at all.

If you have the time it would be great to improve this. Otherwise, I should be able to work on it in the next few weeks.

pet1100 commented 2 years ago

I changed it so we use the size of the array change it to 0 and check the width that way.(unless it is an unsorted list)

codez commented 2 years ago

Thank you for the fix. I applied it in https://github.com/puzzle/prawn-markup/commit/d6b56e47601f62b689aa00eef9b8e73425a47544