package processors import ( "testing" "github.com/stretchr/testify/assert" ) func TestHTML(t *testing.T) { text := `

Title

some text

Another title


And a third one.

  > < & " ' ¢ £ ¥ € © ® “ ” ‘ ’ ‚ &rbquo; „ – — • … ′ ‹ › ™ − » « ° § ¡ &nbsp; &gt; &lt; &amp; &quot; &apos; &cent; &pound; &yen; &euro; &copy; &reg; &ldquo; &rdquo; &lsquo; &rsquo; &sbquo; &rbquo; &bdquo; &ndash; &mdash; &bull; &hellip; &prime; &lsaquo; &rsaquo; &trade; &minus; &raquo; &laquo; &deg; &sect; &iexcl; blah blah LINK text proceeds
hello http://foo` assert.Equal(t, `Title some text Another title. --- And a third one. > < & " ' ¢ £ ¥ € © ® “ ” ‘ ’ ‚ " „ – — • … ′ ‹ › ™ − » « ° § ¡ > < & " ' ¢ £ ¥ € © ® “ ” ‘ ’ ‚ " „ – — • … ′ ‹ › ™ − » « ° § ¡ blah blah wow:// LINK text proceeds hello http://foo`, string(HTML([]byte(text)))) }