jaytaylor / html2text

Golang HTML to plaintext conversion library

Home Page:https://jaytaylor.com/html2text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removes all newlines in HTML doc

theanine opened this issue · comments

Example:

<html><head></head><body><pre>foo1
bar1

foo2
bar2

foo3
bar3

foo4
bar4

foo5
bar5

foo6
bar6

</pre>
</body></html>

Results in:

foo1 bar1 foo2 bar2 foo3 bar3 foo4 bar4 foo5 bar5 foo6 bar6

They @theanine, thanks for pointing this out.

A PR which corrects the behavior is certainly welcome!

commented

Probably a duplicate of #6

There's a patch from @Kleissner waiting in a comment, i'll add a test case and make a PR of it.

Fantastic @helb, looking forward to it.

commented

@jaytaylor ^^ here it is, please review the changes (tests pass, but i have little to no experience with Go…)