abgoyal/html2text — comment on commit e58c2115bcdd773717a0c3ed89d23af087d914fb
File:  line 0
By abgoyal:

In the case of .out('') i leave the previous value of lastWasNL unchanged, so it will work no matter how many .out('') are done in sequence. lastWasNL will remain true as long as the last actually output character was a newline.