Skip to content

Commit

Permalink
FOrmatting
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed Sep 6, 2024
1 parent 84e7523 commit b67d18d
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions models/CLIRenderer.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
component {

property name="JSONPrettyPrint" inject="provider:JSONPrettyPrint";
property name='JSONService' inject='JSONService';
property name="JSONService" inject="JSONService";

processingdirective pageEncoding="UTF-8";

Expand Down Expand Up @@ -303,13 +303,18 @@ component {
param local.thisSpec.debugBuffer = [];
if ( verbose && !local.thisSpec.debugBuffer.isEmpty() ) {
print.text( repeatString( " ", level + 2 ) ).boldWhiteOnGreenLine( "Debug Buffer:" );
print.line(
JSONPrettyPrint.formatJSON(
json = local.thisSpec.debugBuffer,
ansiColors = JSONService.getANSIColors()
).listToArray( chr( 10 ) )
.map( ( line ) => "#repeatString( " ", level + 2 )##line#" ).toList( chr( 10 ) )
).line();
print
.line(
JSONPrettyPrint
.formatJSON(
json = local.thisSpec.debugBuffer,
ansiColors = JSONService.getANSIColors()
)
.listToArray( chr( 10 ) )
.map( ( line ) => "#repeatString( " ", level + 2 )##line#" )
.toList( chr( 10 ) )
)
.line();
}
}

Expand Down Expand Up @@ -359,13 +364,18 @@ component {
param local.thisSpec.debugBuffer = [];
if ( verbose && !local.thisSpec.debugBuffer.isEmpty() ) {
print.text( repeatString( " ", level + 2 ) ).boldWhiteOnGreenLine( "Debug Buffer:" );
print.line(
JSONPrettyPrint.formatJSON(
json = local.thisSpec.debugBuffer,
ansiColors = JSONService.getANSIColors()
).listToArray( chr( 10 ) )
.map( ( line ) => "#repeatString( " ", level + 2 )##line#" ).toList( chr( 10 ) )
).line();
print
.line(
JSONPrettyPrint
.formatJSON(
json = local.thisSpec.debugBuffer,
ansiColors = JSONService.getANSIColors()
)
.listToArray( chr( 10 ) )
.map( ( line ) => "#repeatString( " ", level + 2 )##line#" )
.toList( chr( 10 ) )
)
.line();
}
}
}
Expand Down

0 comments on commit b67d18d

Please sign in to comment.