mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
Better fix for ISSUE#1031 (log messages not wrapping on changes pages). Multiple spaces are replaced with (except for the last one) and single spaces are unchanged. This means significant whitespace is retained without prohibiting wrapping.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6008 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
1de091b92a
commit
5bbf6acc58
1 file changed
+8
@@ -456,6 +456,14 @@ public class Util {
|
||||
else
|
||||
if(ch=='&')
|
||||
buf.append("&");
|
||||
else
|
||||
if(ch==' ') {
|
||||
// All spaces in a block of consecutive spaces are converted to
|
||||
// non-breaking space ( ) except for the last one. This allows
|
||||
// significant whitespace to be retained without prohibiting wrapping.
|
||||
char nextCh = i+1 < text.length() ? text.charAt(i+1) : 0;
|
||||
buf.append(nextCh==' ' ? " " : " ");
|
||||
}
|
||||
else
|
||||
buf.append(ch);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user