aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-04-18 02:06:42 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-04-18 02:06:42 +0400
commitbaff8c8426587f98688afa1ab5df4f3d4afae2b8 (patch)
treebd6da9ca872d22b73580a4f174b3d28b785caf27 /sonar-server/src/main
parent95f0e322189997ffc5692dd3b6103cb58177e6db (diff)
downloadsonarqube-baff8c8426587f98688afa1ab5df4f3d4afae2b8.tar.gz
sonarqube-baff8c8426587f98688afa1ab5df4f3d4afae2b8.zip
SONAR-2282 Show last lines of source code, even if they are blank
Diffstat (limited to 'sonar-server/src/main')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb
index b2eff95b0d2..4fa80501405 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/snapshot_source.rb
@@ -83,6 +83,8 @@ class SnapshotSource < ActiveRecord::Base
private
def self.split_newlines(input)
- input.split(/\r?\n|\r/)
+ # Don't limit number of returned fields and don't suppress trailing empty fields by setting second parameter to negative value.
+ # See http://jira.codehaus.org/browse/SONAR-2282
+ input.split(/\r?\n|\r/, -1)
end
end