html2text icon indicating copy to clipboard operation
html2text copied to clipboard

The text layout changes

Open nirsharony opened this issue 4 years ago • 2 comments

Hi.

I ran the following simple HTML buffer through the library:

<div dir="ltr">I received an e-mail from one of your colleagues a short while back regarding an invoice i received</div>

and to my surprise, I got back:

I received an e-mail from one of your colleagues a short while back
regarding an invoice i received

Why are you adding the extra newline between "back" and "regarding"??

nirsharony avatar Dec 31 '20 13:12 nirsharony

You've probably discovered it by now, but the class has an option for 'width' which defaults to 70 characters. Set this to 0 to prevent the new line. You pass the options array in with the constructor.

peterdutton avatar May 26 '21 11:05 peterdutton

You've probably discovered it by now, but the class has an option for 'width' which defaults to 70 characters. Set this to 0 to prevent the new line. You pass the options array in with the constructor.

Some "genius" (no) came up with adding this by default. Thanks for the corrupted db.

DmitrySkibitsky avatar Aug 03 '21 16:08 DmitrySkibitsky