diff --git a/src/main/webapp/assets/common/js/gitbucket.js b/src/main/webapp/assets/common/js/gitbucket.js index c4dc8ba..9f85f7f 100644 --- a/src/main/webapp/assets/common/js/gitbucket.js +++ b/src/main/webapp/assets/common/js/gitbucket.js @@ -109,7 +109,7 @@ var headTextLines = (params.newText==="")?[]:params.newText.split(/\r\n|\r|\n/); var sm, ctx; if(params.ignoreSpace){ - var ignoreSpace = function(a){ return a.replace(/\s+/,' ').replace(/^\s+|\s+$/,''); }; + var ignoreSpace = function(a){ return a.replace(/\s+/g,''); }; sm = new difflib.SequenceMatcher( $.map(baseTextLines, ignoreSpace), $.map(headTextLines, ignoreSpace));