From a38b3d3ed2c856d06eb61b2c2f8b73ddf7526130 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 2 Mar 2006 03:54:36 +0000 Subject: [PATCH] Trim whitespace from line before appending a newline. --- exec/fseditor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exec/fseditor.js b/exec/fseditor.js index 444e155bb2..4772bde4a8 100644 --- a/exec/fseditor.js +++ b/exec/fseditor.js @@ -775,8 +775,11 @@ function make_string(soft,colour) else { str.=line[i].text; } - if(soft || line[i].hardcr) + if(soft || line[i].hardcr) { + /* Trim whitespace */ + str=str.replace(/\s*$/,''); str+='\n'; + } } return(str); } -- GitLab