in IE <9, code is highlighted, but newlines are ignored, and code is on the same line, as shown below 
how can I get strings that will display correctly, as in the source code, as shown below

I tried changing css so that the lines were display:block; but no difference
what i tried
.CodeMirror pre { display:block; } .CodeMirror-lines div{ display:block; }
JQuery source:
$("span.code, div.code").each(function () { var $this = $(this), isdiv = $this.is("div"), $code = (isdiv) ? $this.html().replace(/^(\r\n)|(\n)/, ''):$this.html(), $unescaped = (isdiv) ? $('<div/>').html($code).text() : $('<span/>').html($code).text(); $this.empty(); if (isdiv) { $this.css({ "display": "block" }); $this.after('<div class="clear"/>'); } var editor = CodeMirror(this, { value: $unescaped, mode: (isdiv) ? "text/html" : "javascript", lineNumbers: (isdiv) ? true : false, readOnly: false }); if (isdiv) { var linecount = editor.lineCount(); for (j = 0; j < linecount; j++) { editor.indentLine(j); } } });
source share