What steps will reproduce the problem?
1. Create an element that contains <br> tags, for instance:
<pre class="prettyprint lang-java">public class Empty{<br>}</pre>
2. Call prettyPrint()
3. Open the page in IE9
4. Try to copy and paste the code into a text editor, and note that the line
break is lost
Replacing the <br> with a newline seems to fix the problem. For instance, using
a bit of jQuery:
$(".prettyprint br").each(function(index, element) {
$(element).replaceWith(document.createTextNode("\n"));
});
A simple example is attached.
Original issue reported on code.google.com by michael....@red-gate.com on 6 Feb 2012 at 11:53
Original issue reported on code.google.com by
michael....@red-gate.com
on 6 Feb 2012 at 11:53Attachments: