Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Statements and the first half of sub x{}.

  • Loading branch information...
commit 54148bbdde08e6b99a95017f26838df1cea003ba 1 parent 67316e5
Jeffrey Goff authored

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 lib/JGoff/App/Perltidy.pm
10 lib/JGoff/App/Perltidy.pm
@@ -382,20 +382,20 @@ sub reformat {
382 382
383 383 my @stack = ( [ $self->ppi, 0, [ 0 ] ] );
384 384
385   - if ( $DEBUG == 1 ) {
386   - warn "\n";
387   - }
388 385 while(@stack) {
389 386 my ( $node, $indent, $index ) = @{ pop @stack };
390 387
391   - $self->_debug_stack( $node, $indent, $index ) if $DEBUG == 1;
  388 + $self->_debug_stack( $node, $indent, $index ) if $DEBUG and $DEBUG == 1;
392 389
393 390 if ( $node->isa( 'PPI::Statement' ) ) {
394 391 $node->insert_after( $self->_whitespace_node( "\n|" ) )
395 392 if $node->next_sibling;
396 393 }
397 394 elsif ( $node->isa( 'PPI::Structure::Block' ) ) {
398   -# $node->insert_after( $self->_whitespace_node( "\n| " ) );
  395 + $node->first_element->insert_after(
  396 + $self->_whitespace_node( "\n|||||" )
  397 + );
  398 + $node->insert_before( $self->_whitespace_node( "\n|||" ) );
399 399 }
400 400
401 401 if ( $node->can( 'elements' ) ) {

0 comments on commit 54148bb

Please sign in to comment.
Something went wrong with that request. Please try again.