julianhille / MuhammaraJS

Muhammara a node module with c/cpp bindings to modify PDF with js for node or electron (based/replacement on/of galkhana/hummusjs)
Other
205 stars 43 forks source link

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

Open joemoongit opened 1 year ago

joemoongit commented 1 year ago

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()

julianhille commented 1 year ago

Thank you very much for the pr

julianhille commented 1 year ago

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

joemoongit commented 1 year ago

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?

julianhille commented 1 year ago

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 commented 1 year ago

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

joemoongit commented 12 months ago

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

julianhille commented 12 months ago

Ah. Dang. Sorry. Please reopen against dev.

julianhille commented 12 months ago

Test to reopen.

joemoongit commented 11 months ago

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

julianhille commented 11 months ago

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

joemoongit commented 11 months ago

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