Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Statements and the first half of sub x{}.

  • Loading branch information...
commit 54148bbdde08e6b99a95017f26838df1cea003ba 1 parent 67316e5
Jeffrey Goff authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/JGoff/App/Perltidy.pm
10 lib/JGoff/App/Perltidy.pm
View
@@ -382,20 +382,20 @@ sub reformat {
my @stack = ( [ $self->ppi, 0, [ 0 ] ] );
- if ( $DEBUG == 1 ) {
- warn "\n";
- }
while(@stack) {
my ( $node, $indent, $index ) = @{ pop @stack };
- $self->_debug_stack( $node, $indent, $index ) if $DEBUG == 1;
+ $self->_debug_stack( $node, $indent, $index ) if $DEBUG and $DEBUG == 1;
if ( $node->isa( 'PPI::Statement' ) ) {
$node->insert_after( $self->_whitespace_node( "\n|" ) )
if $node->next_sibling;
}
elsif ( $node->isa( 'PPI::Structure::Block' ) ) {
-# $node->insert_after( $self->_whitespace_node( "\n| " ) );
+ $node->first_element->insert_after(
+ $self->_whitespace_node( "\n|||||" )
+ );
+ $node->insert_before( $self->_whitespace_node( "\n|||" ) );
}
if ( $node->can( 'elements' ) ) {
Please sign in to comment.
Something went wrong with that request. Please try again.