From 491f587c7de041ab4878846b8be273884729a79b Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Mon, 22 Feb 2010 17:50:29 -0600 Subject: [PATCH] fix newline problems with code editor --- www/extras/yui-webgui/build/code-editor/code-editor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/extras/yui-webgui/build/code-editor/code-editor.js b/www/extras/yui-webgui/build/code-editor/code-editor.js index 955bdeb83..d153210c6 100755 --- a/www/extras/yui-webgui/build/code-editor/code-editor.js +++ b/www/extras/yui-webgui/build/code-editor/code-editor.js @@ -573,6 +573,10 @@ // Remove existing highlighting var html = this.getEditorText(); + // Fix line breaks + html = html.replace( /\n/g, "
"); + 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);