Skip to content

Commit

Permalink
fix newline problems with code editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Bell committed Feb 23, 2010
1 parent 8b75bb9 commit e159bab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions www/extras/yui-webgui/build/code-editor/code-editor.js
Expand Up @@ -650,6 +650,10 @@
// Remove existing highlighting
var html = this.getEditorText();

// Fix line breaks
html = html.replace( /\n/g, "<br>");
html = html.replace( /\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;" );

// Apply new highlighting
for (var i = 0; i < this.keywords.length; i++) {
html = html.replace(this.keywords[i].code, this.keywords[i].tag);
Expand Down

0 comments on commit e159bab

Please sign in to comment.