This time, the empty lines are dealt with properly.
commit e504c843c1a1989da3f44c714f2e71f70df4ee38
Author: Akim Demaille <[email protected]>
Date: Thu Aug 23 18:49:46 2018 +0200
examples: fix the leading empty line
* examples/extexi: Really avoid the first empty line.
Remove useless `next`.
diff --git a/examples/extexi b/examples/extexi
index f7157c07..80d7dd5d 100755
--- a/examples/extexi
+++ b/examples/extexi
@@ -116,17 +116,16 @@ sub process ($)
{
if (/^\@(small)?example$/)
{
- $input .= "\n" unless defined $input;
# Bison supports synclines, but not Flex.
$input .= sprintf ("#line %s \"$in\"\n", $. + 1)
if $synclines && $file =~ /\.[chy]*$/;
- next;
}
elsif (/^\@end (small)?example$/)
{
die "no contents: $file"
if $input eq "";
+ $file{$file}{$block} .= "\n" if defined $file{$file}{$block};
$file{$file}{$block} .= normalize($input);
$file = $input = undef;
++$block;