diff --git a/js/aceBindings.js b/js/aceBindings.js index 62ba922..231cb5c 100644 --- a/js/aceBindings.js +++ b/js/aceBindings.js @@ -133,7 +133,7 @@ define([ var range = selection.getLineRange(i); range.end.row = range.start.row; range.end.column = line.length; - line = line.replace(/\s+$/, ""); + line = line.replace(/(\S)\s+$/, "$1"); doc.replace(range, line); }); if (c) c(); @@ -166,4 +166,4 @@ define([ if (c) c(); }); -}); \ No newline at end of file +});