in lib/ES/DocsParser.pm [70:110]
sub start {
#===================================
my ( $self, $tag, $attr ) = @_;
return unless $self->{stack};
my $current = $self->{stack}[-1];
# ignoring section
if ( $current->[0] eq 'ignore' ) {
push @{ $current->[1] }, $tag;
return;
}
my $class = $attr->{class} || '';
if ( $current->[0] eq 'title' ) {
if ( $tag eq 'a' ) {
$self->{sections}[-1]{id} = $attr->{id} if $attr->{id};
$self->new_stack( 'ignore', $tag ) if $class eq 'edit_me';
}
return;
}
if ( $tag eq 'div' ) {
return $self->new_stack('breadcrumbs')
if $class eq 'breadcrumbs';
return $self->new_stack( 'ignore', $tag )
if $class =~ 'navheader'
|| $class eq 'navfooter'
|| $class eq 'toc';
}
return $self->new_stack( 'ignore', $tag )
if $tag eq 'a' and $class =~ /(console|sense)_widget/;
if ( $tag =~ /^h\d/ ) {
$self->new_stack('title');
$self->new_section;
}
}