mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
examples: fix the leading empty line
* examples/extexi: Really avoid the first empty line. Remove useless `next`.
This commit is contained in:
@@ -116,17 +116,16 @@ sub process ($)
|
|||||||
{
|
{
|
||||||
if (/^\@(small)?example$/)
|
if (/^\@(small)?example$/)
|
||||||
{
|
{
|
||||||
$input .= "\n" unless defined $input;
|
|
||||||
# Bison supports synclines, but not Flex.
|
# Bison supports synclines, but not Flex.
|
||||||
$input .= sprintf ("#line %s \"$in\"\n", $. + 1)
|
$input .= sprintf ("#line %s \"$in\"\n", $. + 1)
|
||||||
if $synclines && $file =~ /\.[chy]*$/;
|
if $synclines && $file =~ /\.[chy]*$/;
|
||||||
next;
|
|
||||||
}
|
}
|
||||||
elsif (/^\@end (small)?example$/)
|
elsif (/^\@end (small)?example$/)
|
||||||
{
|
{
|
||||||
die "no contents: $file"
|
die "no contents: $file"
|
||||||
if $input eq "";
|
if $input eq "";
|
||||||
|
|
||||||
|
$file{$file}{$block} .= "\n" if defined $file{$file}{$block};
|
||||||
$file{$file}{$block} .= normalize($input);
|
$file{$file}{$block} .= normalize($input);
|
||||||
$file = $input = undef;
|
$file = $input = undef;
|
||||||
++$block;
|
++$block;
|
||||||
|
|||||||
Reference in New Issue
Block a user