MuhammaraJS icon indicating copy to clipboard operation
MuhammaraJS copied to clipboard

Add test cases for text box underline, strikethrough, and highlight features

Open joemoongit opened this issue 1 year ago • 11 comments

Had to make some modifications to lib/recipe/htmlToTextObjects.js and lib/recipe/text.js to make tests pass when

html: true

is set as an option when invoking .text()

joemoongit avatar Jun 29 '23 23:06 joemoongit

Thank you very much for the pr

julianhille avatar Jun 30 '23 06:06 julianhille

please run prettier on the changed files, prettier is complaining about not compliant files.

see: https://github.com/julianhille/MuhammaraJS/actions/runs/5426565804/jobs/9942641353?pr=311

thanks

julianhille avatar Jul 05 '23 12:07 julianhille

one item to note, when the option

html: true

is set, text wrapped in html tags seem to be created on a new line. i still need to look into this. should i address the fix in this pr? or create another one for it?

joemoongit avatar Jul 11 '23 05:07 joemoongit

i would suggest to start with it and then see. i'd use this as a base branch and then go from there, if its a small change related to this changes add it as commits, if its a complete seperate issue create a PR against this one.

sounds reasonable?

julianhille avatar Jul 11 '23 06:07 julianhille

I changed base too see if this runs in fixed ci. Would you mind reading on that prepare V4 branch?

julianhille avatar Jul 13 '23 19:07 julianhille

i don't mind reading from that branch. i see it was deleted though. which branch should i direct this pr to?

joemoongit avatar Jul 13 '23 23:07 joemoongit

Ah. Dang. Sorry. Please reopen against dev.

julianhille avatar Jul 14 '23 05:07 julianhille

Test to reopen.

julianhille avatar Jul 14 '23 05:07 julianhille

I created a commit to address the text wrapped in html tags appearing on a new line. I've also added a test case for bolded text. There are some spacing issues to address now.

after_Add text with underline inside textbox.pdf before_Add text with underline inside textbox.pdf

joemoongit avatar Aug 03 '23 05:08 joemoongit

sorry this branch has conflicts in the changelog, please rebase / merge dev

julianhille avatar Aug 03 '23 07:08 julianhille

rebased. will work on spacing and may modify the changes a bit more

joemoongit avatar Aug 03 '23 07:08 joemoongit

I will move the changes for the bug fix into its own branch and just keep the tests on this one

joemoongit avatar Aug 26 '24 16:08 joemoongit