fix newline problems with code editor
This commit is contained in:
parent
a63a70b8bd
commit
491f587c7d
1 changed files with 4 additions and 0 deletions
|
|
@ -573,6 +573,10 @@
|
|||
// Remove existing highlighting
|
||||
var html = this.getEditorText();
|
||||
|
||||
// Fix line breaks
|
||||
html = html.replace( /\n/g, "<br>");
|
||||
html = html.replace( /\t/g, " " );
|
||||
|
||||
// Apply new highlighting
|
||||
for (var i = 0; i < this.keywords.length; i++) {
|
||||
html = html.replace(this.keywords[i].code, this.keywords[i].tag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue