File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ func HTML2Text(html string) string {
165165 outBuf .WriteString ("\r \n " )
166166 } else if tagName == "p" || tagName == "/p" {
167167 if canPrintNewline {
168- outBuf .WriteString ("\r \n " )
168+ outBuf .WriteString ("\r \n \r \n " )
169169 }
170170 canPrintNewline = false
171171 } else if badTagnamesRE .MatchString (tagName ) {
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ func TestHTML2Text(t *testing.T) {
2323 Convey ("Line breaks" , func () {
2424 So (HTML2Text ("should \n ignore \r \n new lines" ), ShouldEqual , "should ignore new lines" )
2525 So (HTML2Text (`two<br>line<br/>breaks` ), ShouldEqual , "two\r \n line\r \n breaks" )
26- So (HTML2Text (`<p>two</p><p>paragraphs</p>` ), ShouldEqual , "two\r \n paragraphs" )
26+ So (HTML2Text (`<p>two</p><p>paragraphs</p>` ), ShouldEqual , "two\r \n \r \ n paragraphs" )
2727 })
2828
2929 Convey ("HTML entities" , func () {
You can’t perform that action at this time.
0 commit comments