bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: master: examples: fix the leading empty line


From: Akim Demaille
Subject: FYI: master: examples: fix the leading empty line
Date: Fri, 24 Aug 2018 19:23:35 +0200

This time, the empty lines are dealt with properly.

commit e504c843c1a1989da3f44c714f2e71f70df4ee38
Author: Akim Demaille <address@hidden>
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 (/address@hidden (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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]