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,6 +68,14 @@ public class Report {
|
|||
public void format( ReportMessage message, Appendable buf ) throws IOException {
|
||||
if ( message.type == ReportMessage.NESTED_BLOCK ) {
|
||||
// Already formatted this once, indent it instead.
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue