List:Commits« Previous MessageNext Message »
From:paul Date:May 19 2006 5:37pm
Subject:svn commit - mysqldoc@docsrva: r2130 - in trunk: . tools
View as plain text  
Author: paul
Date: 2006-05-19 19:37:02 +0200 (Fri, 19 May 2006)
New Revision: 2130

Log:
 r10525@frost:  paul | 2006-05-19 12:34:01 -0500
 Bug fix: Empty block resulted in failure to pop block stack.


Modified:
   trunk/
   trunk/tools/fill_help_tables2.pl


Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7614
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10508
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7614
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10525
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886

Modified: trunk/tools/fill_help_tables2.pl
===================================================================
--- trunk/tools/fill_help_tables2.pl	2006-05-19 14:20:45 UTC (rev 2129)
+++ trunk/tools/fill_help_tables2.pl	2006-05-19 17:37:02 UTC (rev 2130)
@@ -655,45 +655,47 @@
         shift (@text) while @text && $text[0] =~ /^\s*$/;
         pop (@text) while @text && $text[$#text] =~ /^\s*$/;
         #warn "$lno:Result:\n", join ("\n", @text), "\n" if $debug;
-        next unless @text;   # empty? then skip it
-        # Add bullet if we're within a list and this is the first
-        # para within the current item
+        if (@text)   # process text unless empty
+        {
+          # Add bullet if we're within a list and this is the first
+          # para within the current item
 # BUG: But not if first para is an example, but can that occur?
 # What if para is verbatim?
 
 #warn "Text wrap flags: $text_flags; bullet: $bullet; item_par: $item_par\n";
 #warn "Format text block: item_num $item_num, item_par $item_par\n";
-        $tab1 = "";
-        $tab2 = "";
-        if (defined ($list))          # we're in a list
-        {
-          $tab1 = " " x $list->{indent};
-          $tab2 = " " x $list->{indent};
-          if ($list->{bullet} eq "BULLET")
+          $tab1 = "";
+          $tab2 = "";
+          if (defined ($list))          # we're in a list
           {
-            $tab1 .= ($item->{item_par} == 1 ? "o " : "  ");
-            $tab2 .= "  ";
+            $tab1 = " " x $list->{indent};
+            $tab2 = " " x $list->{indent};
+            if ($list->{bullet} eq "BULLET")
+            {
+              $tab1 .= ($item->{item_par} == 1 ? "o " : "  ");
+              $tab2 .= "  ";
+            }
+            elsif ($list->{bullet} eq "NUMBER")
+            {
+              $tab1 .= ($item->{item_par} == 1 ? "$list->{item_num}. " : "   ");
+              $tab2 .= "   ";
+            }
+            else
+            {
+              # This should never happen; only legal bullets should be
+              # accepted when processing HELP-LIST-BEGIN lines.
+              die "$lno:LOGIC ERROR: Unrecognized bullet ($list->{bullet})\n";
+            }
           }
-          elsif ($list->{bullet} eq "NUMBER")
+          if ($text_flags eq "WRAP")      # perform line-wrapping
           {
-            $tab1 .= ($item->{item_par} == 1 ? "$list->{item_num}. " : "   ");
-            $tab2 .= "   ";
+            push @result, wrap ($tab1, $tab2, @text) . "\n";
           }
-          else
+          else                            # text is verbatim, no wrapping
           {
-            # This should never happen; only legal bullets should be
-            # accepted when processing HELP-LIST-BEGIN lines.
-            die "$lno:LOGIC ERROR: Unrecognized bullet ($list->{bullet})\n";
+            push @result, join ("\n", @text) . "\n";
           }
         }
-        if ($text_flags eq "WRAP")      # perform line-wrapping
-        {
-          push @result, wrap ($tab1, $tab2, @text) . "\n";
-        }
-        else                            # text is verbatim, no wrapping
-        {
-          push @result, join ("\n", @text) . "\n";
-        }
         #@text = ();
         ($tag_type, $text_flags) = @{pop @block_stack};
       }
@@ -716,7 +718,15 @@
       die "$lno:Unrecognized line (matches no known block \@HELP- tag): $_\n";
     }
   }
-  die "$.:Unterminated \@HELP- tag(s)\n" if @block_stack;
+  if (@block_stack)
+  {
+    warn "$.:Unterminated \@HELP- tag(s).  Tag stack dump:\n";
+    foreach my $block_ref (@block_stack)
+    {
+      warn join (", ", @{$block_ref}), "\n";
+    }
+    exit (1);
+  }
   warn "$.:Analyzed text:\n---\n",  join ("\n", @result), "---\n" if $debug;
   my $result = join ("\n", @result);
   $result =~ s/\\/\\\\/g;

Thread
svn commit - mysqldoc@docsrva: r2130 - in trunk: . toolspaul19 May