diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-13 15:11:12 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-13 15:11:12 +0100 |
commit | 987dd4b2aaa19386a69f83f02d95c18ead64639d (patch) | |
tree | 5d688a75cbfd6c3cde10f205366de599cad2a779 | |
parent | 2039a62b897e0d884b91989311f2681f4dd1ef06 (diff) | |
download | sonarqube-987dd4b2aaa19386a69f83f02d95c18ead64639d.tar.gz sonarqube-987dd4b2aaa19386a69f83f02d95c18ead64639d.zip |
SONAR-3003 Fix issue
=> when #split_newlines is called by #convert_string_to_unix_newlines
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb index 5be6419a9d2..6d89067a591 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/api/utils.rb @@ -50,9 +50,9 @@ class Api::Utils # - http://jira.codehaus.org/browse/SONAR-2282 first modified the behaviour to keep the trailing lines # - then http://jira.codehaus.org/browse/SONAR-3003 reverted this modification to remove potential last empty line def self.split_newlines(input) - input.split(/\r?\n|\r/, -1) - input.pop if input.last=='' - input + result = input.split(/\r?\n|\r/, -1) + result.pop if result.last=='' + result end def self.convert_string_to_unix_newlines(input) |