231 |
|
} |
232 |
|
else { |
233 |
|
if ( $#{$self->{textstack}} > -1 ) { |
234 |
< |
if ( $self->{textcontext} eq $self->{tagname} ) { |
235 |
< |
$self->{textcontext}=pop @{$self->{textstack}}; |
236 |
< |
} |
234 |
> |
if ( $self->{textcontext} eq $self->{tagname} ) { |
235 |
> |
if ( $self->{tagcontainer}->definescontext($self->{tagname}) ) { |
236 |
> |
# -- watch out for valid tags we ignore in this parse |
237 |
> |
$self->{textcontext}=pop @{$self->{textstack}}; |
238 |
> |
} |
239 |
> |
} |
240 |
|
else { #The tag we are closing is not the last one so |
241 |
|
# we keep our current context. |
242 |
|
$self->_removefromstack($self->{tagname},$self->{textstack}); |
244 |
|
|
245 |
|
} |
246 |
|
else { # more close tags than open ones |
247 |
+ |
if ( $self->{tagcontainer}->definescontext($self->{tagname}) ) { |
248 |
|
print "Warning : Unmatched </...> tag on line ". |
249 |
|
$self->line()."\n"; |
250 |
+ |
} |
251 |
|
} |
252 |
|
} |
253 |
|
} |
385 |
|
|
386 |
|
# Do we have a label name? |
387 |
|
if ( $self->{lastlabel} ne "" ) { |
388 |
< |
$self->{tagvar}{$self->{lastlabel}}=$self->_getstore(); |
388 |
> |
(my $label=$self->{lastlabel})=~tr[A-Z][a-z]; |
389 |
> |
$self->{tagvar}{$label}=$self->_getstore(); |
390 |
|
$self->{lastlabel}=""; |
391 |
|
} |
392 |
|
elsif ( $self->_getstore() ne "") { |