texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp/Texinfo Parser.pm Convert/Converter....


From: Patrice Dumas
Subject: texinfo/tp/Texinfo Parser.pm Convert/Converter....
Date: Wed, 31 Aug 2011 20:42:02 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/08/31 20:42:02

Modified files:
        tp/Texinfo     : Parser.pm 
        tp/Texinfo/Convert: Converter.pm HTML.pm Plaintext.pm XML.pm 

Log message:
        Do not go up in the sectioning elements root.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.282&r2=1.283
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.140&r2=1.141
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.155&r2=1.156
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/XML.pm?cvsroot=texinfo&r1=1.4&r2=1.5

Patches:
Index: Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.282
retrieving revision 1.283
diff -u -b -r1.282 -r1.283
--- Parser.pm   21 Aug 2011 14:20:54 -0000      1.282
+++ Parser.pm   31 Aug 2011 20:42:00 -0000      1.283
@@ -950,6 +950,7 @@
   my $text = '';
   $type = "($current->{'type'})" if (defined($current->{'type'}));
   $cmd = "address@hidden>{'cmdname'}" if (defined($current->{'cmdname'}));
+  $cmd .= "($current->{'level'})" if (defined($current->{'level'}));
   $text = "[text: $current->{'text'}]" if (defined($current->{'text'}));
   if ($current->{'parent'}) {
     my $parent = $current->{'parent'};

Index: Convert/Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- Convert/Converter.pm        27 Aug 2011 22:57:59 -0000      1.30
+++ Convert/Converter.pm        31 Aug 2011 20:42:01 -0000      1.31
@@ -52,6 +52,9 @@
   'SPLIT_SIZE'           => 300000,
   'paragraphindent'      => 3,
   'fillcolumn'           => 72,
+  'expanded_formats'     => undef,
+  'include_directories'  => undef,
+
   
 
   'DEBUG'                => 0,
@@ -90,7 +93,7 @@
     bless $converter;
   } elsif (defined($class)) {
     bless $converter, $class;
-    $name = ref($class);
+    $name = ref($converter);
     $conf = shift;
   } else {
     bless $converter;

Index: Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -b -r1.140 -r1.141
--- Convert/HTML.pm     30 Aug 2011 22:26:45 -0000      1.140
+++ Convert/HTML.pm     31 Aug 2011 20:42:01 -0000      1.141
@@ -843,8 +843,6 @@
   'OUTFILE'              => undef,
   'SUBDIR'               => undef,
   'NUMBER_FOOTNOTES'     => 1,
-  'expanded_formats'     => undef,
-  'include_directories'  => undef,
   'NUMBER_SECTIONS'      => 1,
   'USE_NODES'            => 1,
   'INLINE_CONTENTS'      => 1,

Index: Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -b -r1.155 -r1.156
--- Convert/Plaintext.pm        20 Aug 2011 14:38:47 -0000      1.155
+++ Convert/Plaintext.pm        31 Aug 2011 20:42:02 -0000      1.156
@@ -288,8 +288,6 @@
   'NUMBER_FOOTNOTES'     => 1,
   'empty_lines_count'    => undef,
   'SPLIT_SIZE'           => 300000,
-  'expanded_formats'     => undef,
-  'include_directories'  => undef,
   'NUMBER_SECTIONS'      => 1,
 
   'DEBUG'                => 0,

Index: Convert/XML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/XML.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- Convert/XML.pm      30 Aug 2011 22:26:46 -0000      1.4
+++ Convert/XML.pm      31 Aug 2011 20:42:02 -0000      1.5
@@ -623,7 +623,8 @@
     if ($context_block_commands{$root->{'cmdname'}}) {
       pop @{$self->{'document_context'}};
     }
-  } elsif ($Texinfo::Common::root_commands{$root->{'cmdname'}}
+  } elsif ($root->{'cmdname'} 
+           and $Texinfo::Common::root_commands{$root->{'cmdname'}}
            and $root->{'cmdname'} ne 'node') {
     my $command = _level_corrected_section($root);
     if (!($root->{'section_childs'} and scalar(@{$root->{'section_childs'}}))
@@ -631,6 +632,9 @@
       $result .= "</$command>\n";
       my $current = $root;
       while ($current->{'section_up'}
+             # the most up element is a virtual sectioning root element, this
+             # condition avoids getting into it
+             and $current->{'section_up'}->{'cmdname'}
              and _level_corrected_section($current->{'section_up'}) ne 'top') {
         $current = $current->{'section_up'};
         $result .= '</'._level_corrected_section($current) .">\n";



reply via email to

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