scinfu/SwiftSoup

Setting new html looses line breaks

kevinrenskers opened this issue · 1 comments

For example, when I do this:

node.html("<span class='test'>hello\nworld</span>")

The result is without that newline. This is a problem where I want to wrap some code inside a <pre><code> block, but the .html function looses newlines.

I just encountered the same problem. The new lines in span tags are not kept, which is too bad in <pre><code> tags.