texi2html-cvs
[Top][All Lists]
Advanced

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

[Texi2html-cvs] texi2html TODO examples/info.init test/formatti...


From: Patrice Dumas
Subject: [Texi2html-cvs] texi2html TODO examples/info.init test/formatti...
Date: Sun, 26 Apr 2009 18:27:26 +0000

CVSROOT:        /cvsroot/texi2html
Module name:    texi2html
Changes by:     Patrice Dumas <pertusus>        09/04/26 18:27:26

Modified files:
        .              : TODO 
        examples       : info.init 
        test/formatting: tests.txt 
Added files:
        test/formatting/res/nested_formats_info: nested_formats.info 

Log message:
        Don't indent @format and @smallformat in info output.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/TODO?cvsroot=texi2html&r1=1.91&r2=1.92
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/info.init?cvsroot=texi2html&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/formatting/tests.txt?cvsroot=texi2html&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/formatting/res/nested_formats_info/nested_formats.info?cvsroot=texi2html&rev=1.1

Patches:
Index: TODO
===================================================================
RCS file: /cvsroot/texi2html/texi2html/TODO,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- TODO        26 Apr 2009 17:35:47 -0000      1.91
+++ TODO        26 Apr 2009 18:27:25 -0000      1.92
@@ -389,3 +389,6 @@
 
 * in info, @. @! and @? should always be followed by at least 2 spaces
   even in text, not only on end of lines.
+
+* add tests for -o - and input coming from stdin, including check of 
+  out file names.

Index: examples/info.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/info.init,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- examples/info.init  26 Apr 2009 17:35:48 -0000      1.37
+++ examples/info.init  26 Apr 2009 18:27:25 -0000      1.38
@@ -203,6 +203,8 @@
     $info_default_format{$command} = 1;
 }
 
+$info_default_indented_commands{'format'} = 0;
+$info_default_indented_commands{'smallformat'} = 0;
 
 $style = \&info_default_style;
 $print_page_head   = \&info_default_print_page_head;
@@ -579,11 +581,11 @@
 print STDERR "SKIP_SPACES begin\n";
             return if ($content->{'begin'} ne '');
         } 
-        if (defined($content->{'content'}) or defined($content->{'format'})
+        if (defined($content->{'content'}) or 
defined($content->{'format_name'})
             or $content->{'definition_line'})
         { # non empty commands stop space skipping, even if they contain 
           # only spaces, like @asis{ }
-          # also for item(x) that have format defined
+          # also for item(x) that have format_name defined
 print STDERR "SKIP_SPACES command?\n";
             return;
         }
@@ -741,13 +743,20 @@
           if ($info_default_indented_commands{$content->{'command'}})
           {
               $indent_level--;
-              if ($indent_level > 0 and !$info_state->{'blank_line'} and 
$content->{'command'} !~ /^deff_item/)
+              if ($indent_level > 0 and !$info_state->{'blank_line'} and 
$content->{'command'} !~ /^deff_item/ and !$preformatted)
               {
                  $text_added .= "\n";
               }
               # this nullify a potential noindent in a random format
               $info_state->{'indent_para'} = undef;
           }
+          elsif ($complex_format_map->{$content->{'command'}})
+          {
+              if (!$info_state->{'blank_line'} and 
$info_state->{'only_spaces'} and ($indent_level > 0) and !$preformatted)
+              {
+                 $text_added .= "\n";
+              }
+          }
           if ($content->{'command'} eq 'paragraph' and 
$info_state->{'align_stack'}->[-1]->{'command'} eq 'normal')
           {
               # if there is no space at the end of a paragraph, there may be 
@@ -1057,9 +1066,9 @@
                   
                   goto new_text;
               }
-              elsif (($content->{'command'} eq 'item' or $content->{'command'} 
eq 'itemx') and exists $format_map{$content->{'format'}})
+              elsif (($content->{'command'} eq 'item' or $content->{'command'} 
eq 'itemx') and exists $format_map{$content->{'format_name'}})
               {
-                  $item_pending = $content->{'format'};
+                  $item_pending = $content->{'format_name'};
                   #if (!$info_state->{'blank_line'} and $content->{'command'} 
eq 'item')
                   my $first_item = 0;
                   
@@ -1141,13 +1150,20 @@
                   {
                      info_default_skip_spaces($current, $index, $close);
                   }
-                  elsif (!$info_state->{'blank_line'} and 
$info_state->{'only_spaces'} and ($indent_level != 0))
+                  elsif (!$info_state->{'blank_line'} and 
$info_state->{'only_spaces'} and ($indent_level != 0) and !$preformatted)
                   {
                      $text_added .= "\n";
                   }
                   # there is no close if !$content->{'content'}
                   $indent_level++ if ($content->{'content'});
               }
+              elsif ($complex_format_map->{$content->{'command'}})
+              {
+                  if (!$info_state->{'blank_line'} and 
$info_state->{'only_spaces'} and ($indent_level != 0) and !$preformatted)
+                  {
+                     $text_added .= "\n";
+                  }
+              }
           }
 
           if (defined($content->{'text'}))
@@ -2720,7 +2736,7 @@
    }
    else
    {
-       info_default_store_text ($state, '', $command, {'format' => $format});
+       info_default_store_text ($state, '', $command, {'format_name' => 
$format});
    }
    return undef;
 }

Index: test/formatting/tests.txt
===================================================================
RCS file: /cvsroot/texi2html/texi2html/test/formatting/tests.txt,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- test/formatting/tests.txt   26 Apr 2009 15:21:16 -0000      1.17
+++ test/formatting/tests.txt   26 Apr 2009 18:27:26 -0000      1.18
@@ -99,4 +99,5 @@
 test_sp_info test_sp.texi -init info.init
 kbdinputstyle_info kbdinputstyle.texi -init info.init
 simple_images_info simple_images.texi -init info.init
+nested_formats_info nested_formats.texi -init info.init
 formatting_info ../coverage/formatting.texi -init info.init -U texi2html

Index: test/formatting/res/nested_formats_info/nested_formats.info
===================================================================
RCS file: test/formatting/res/nested_formats_info/nested_formats.info
diff -N test/formatting/res/nested_formats_info/nested_formats.info
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/formatting/res/nested_formats_info/nested_formats.info 26 Apr 2009 
18:27:26 -0000      1.1
@@ -0,0 +1,21 @@
+This is nested_formats.info, produced by makeinfo version 4.13 from
+nested_formats.texi.
+
+
+File: nested_formats.info,  Node: Top,  Up: (dir)
+
+top
+***
+
+
+     in -- format/example
+
+
+     in -- example/format
+
+
+
+Tag Table:
+Node: Top90
+
+End Tag Table




reply via email to

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