texinfo/texinfo-5.0-parser.patch

21 lines
1019 B
Diff

diff -up texinfo-5.0/tp/Texinfo/Parser.pm.orig texinfo-5.0/tp/Texinfo/Parser.pm
--- texinfo-5.0/tp/Texinfo/Parser.pm.orig 2013-02-15 00:01:44.000000000 +0100
+++ texinfo-5.0/tp/Texinfo/Parser.pm 2013-03-05 14:33:25.384193273 +0100
@@ -1631,9 +1631,13 @@ sub _close_current($$$;$$)
my $conditional = pop @{$current->{'parent'}->{'contents'}};
}
}
- my $context = pop @{$self->{'context_stack'}} if
- ($preformatted_commands{$current->{'cmdname'}}
- or $menu_commands{$current->{'cmdname'}});
+ if ($preformatted_commands{$current->{'cmdname'}}
+ or $menu_commands{$current->{'cmdname'}}
+ or $format_raw_commands{$current->{'cmdname'}}) {
+ my $context = pop @{$self->{'context_stack'}};
+ pop @{$self->{'raw_formats_stack'}}
+ if ($format_raw_commands{$current->{'cmdname'}});
+ }
pop @{$self->{'regions_stack'}}
if ($region_commands{$current->{'cmdname'}});
$current = $current->{'parent'};