Hello,
I'm using lxml's htmldiff function to (surprise) diff two HTML snippets.
However I have found that if the snippet includes a <pre> tag then any
newlines are stripped from it. For example:
>>> html = "<pre>test\ntest2\ntest3</pre>"
>>> print repr(htmldiff(html, html))
u'<pre>test test2 test3</pre>'
Is there a reason for this, or better yet is there a way I can stop this
from occurring? I was under the impression that inside a pre tag newlines
and whitespace are handled differently and shouldn't be stripped like you
can do with other HTML tags.
Tom