Changeset 1039

Show
Ignore:
Timestamp:
06/04/10 13:58:11 (14 years ago)
Author:
miro
Message:

fix

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/doc/toolbox_doc/filter_annotated.pl

    r1007 r1039  
    3131 
    3232my $html = HTML::TreeBuilder->new(); 
     33$html->store_comments(1); 
    3334$html->parse_file($filename); 
    3435my $body = $html->content_array_ref()->[1]; 
     
    4849 
    4950$i = 0; 
     51my @to_delete; 
    5052while (my $node = $table->content_array_ref()->[$i++]) { 
    5153    #;;print_content($node); 
     
    5355                     ->content_array_ref()->[0] #a 
    5456                     ->content_array_ref()->[0]; #bdm::ARX 
    55     ;;;print STDERR "$class\n"; 
    5657 
    57     ;;;map {print STDERR " $_\n"} grep {$_ eq $class} @classes; 
     58    #;;map {print STDERR " $_\n"} grep {$_ eq $class} @classes; 
     59    #;;print STDERR "$class\n"; 
    5860 
    59     next if grep {$_ eq $class} @classes; 
     61    if (grep {$_ eq $class} @classes) { 
     62        ;;;print "$class is in @classes\n"; 
     63        next; 
     64    }; 
    6065 
    61     ;;;print STDERR "Hey! I passed after the grep!\n"; 
     66    #;;print STDERR "$class will be detached\n"; 
     67    #;;print STDERR $node->tag() . ' ' . $node->{_parent}->tag() . "\n"; 
    6268 
    63     $node->detach(); 
     69    push @to_delete, $node; 
    6470} 
     71 
     72$_->delete() for @to_delete; 
     73 
     74#;;print_content($table); 
    6575 
    6676#print the result