Skip to content

Commit

Permalink
mark current as block in any case, as we open a block
Browse files Browse the repository at this point in the history
  • Loading branch information
ruz committed Jan 9, 2011
1 parent a29361e commit 6ac48d3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/HTML/Quoted.pm
Expand Up @@ -159,16 +159,13 @@ sub handle_start {
$meta->{'in'}{'br'} = 1;
}
elsif ( !$INLINE_TAG{ $tag } ) {
if ( !$meta->{'in'}{'block'}[-1] ) {
if ( keys %{ $meta->{'current'} } ) {
push @{ $stack->[-1] }, $meta->{'current'}
= { block => 1, raw => '' };
} else {
$meta->{'current'}{'block'} = 1;
}
if ( !$meta->{'in'}{'block'}[-1] && keys %{ $meta->{'current'} } ) {
push @{ $stack->[-1] }, $meta->{'current'} = { raw => '' };
}
$meta->{'in'}{'block'}[-1]++;
$meta->{'current'}{'block'} = 1;
$meta->{'current'}{'raw'} .= $text;

$meta->{'in'}{'block'}[-1]++;
}
else {
$meta->{'current'}{'raw'} .= $text;
Expand Down

0 comments on commit 6ac48d3

Please sign in to comment.