Omitted leading newlines when formatting NESTED_BLOCK messages
This commit is contained in:
parent
e86c38a4ee
commit
2033c80d6a
1 changed files with 9 additions and 1 deletions
|
@ -68,7 +68,15 @@ public class Report {
|
||||||
public void format( ReportMessage message, Appendable buf ) throws IOException {
|
public void format( ReportMessage message, Appendable buf ) throws IOException {
|
||||||
if ( message.type == ReportMessage.NESTED_BLOCK ) {
|
if ( message.type == ReportMessage.NESTED_BLOCK ) {
|
||||||
// Already formatted this once, indent it instead.
|
// Already formatted this once, indent it instead.
|
||||||
indent( message.text, buf );
|
|
||||||
|
// Skip leading newlines
|
||||||
|
int start = 0;
|
||||||
|
while ( start < message.text.length() && message.text.charAt(start) == '\n' )
|
||||||
|
start++;
|
||||||
|
if ( start > 0 )
|
||||||
|
indent( message.text.subSequence( start, message.text.length() ), buf );
|
||||||
|
else
|
||||||
|
indent( message.text, buf );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue