texinfo-commits
[Top][All Lists]
Advanced

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

[7458] convert float type with Texinfo::Convert::Texinfo


From: gavinsmith0123
Subject: [7458] convert float type with Texinfo::Convert::Texinfo
Date: Sun, 16 Oct 2016 19:50:56 +0000 (UTC)

Revision: 7458
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7458
Author:   gavin
Date:     2016-10-16 19:50:56 +0000 (Sun, 16 Oct 2016)
Log Message:
-----------
convert float type with Texinfo::Convert::Texinfo

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Parser.pm
    trunk/tp/t/results/coverage/block_commands.pl
    trunk/tp/t/results/coverage/punctuation_in_line_commands.pl
    trunk/tp/t/results/float/comment_space_comand_in_float.pl
    trunk/tp/t/results/float/float_copying.pl
    trunk/tp/t/results/float/float_with_at_commands.pl
    trunk/tp/t/results/float/listoffloats_with_commands.pl
    trunk/tp/t/results/float/numbering_captions_listoffloats.pl
    trunk/tp/t/results/misc_commands/comment_space_command_on_line.pl

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2016-10-16 18:13:14 UTC (rev 7457)
+++ trunk/ChangeLog     2016-10-16 19:50:56 UTC (rev 7458)
@@ -1,5 +1,13 @@
 2016-10-16  Gavin Smith  <address@hidden>
 
+       * tp/Texinfo/Parser.pm (_parse_float_type): Convert type of
+       float with Texinfo::Convert::Texinfo instead of with 
+       Texinfo::Convert::NodeNameNormalization.
+       * tp/Texinfo/Parser.pm (_end_line) <@listoffloats>: Remove 
+       commented-out code.
+
+2016-10-16  Gavin Smith  <address@hidden>
+
        * tp/Texinfo/Convert/Info.pm (output) <anchors and nodes>,
        (_node): Don't refer to 'normalized' value on an element defining an
        xref target; use 'node_content' instead.

Modified: trunk/tp/Texinfo/Parser.pm
===================================================================
--- trunk/tp/Texinfo/Parser.pm  2016-10-16 18:13:14 UTC (rev 7457)
+++ trunk/tp/Texinfo/Parser.pm  2016-10-16 19:50:56 UTC (rev 7458)
@@ -55,7 +55,7 @@
 # encoding_alias
 use Texinfo::Encoding;
 
-# to normalize node name, anchor, float arg, listoffloats and first *ref 
argument.
+# to normalize node name, anchor, float arg, and first *ref argument.
 use Texinfo::Convert::NodeNameNormalization;
 # in error messages, and for macro body expansion
 use Texinfo::Convert::Texinfo;
@@ -2232,13 +2232,10 @@
     _trim_spaces_comment_from_content(address@hidden);
     if (@type_contents) {
       my $normalized 
-        = Texinfo::Convert::NodeNameNormalization::normalize_node(
-                                               {'contents' => address@hidden);
+        = Texinfo::Convert::Texinfo::convert({'contents' => address@hidden);
       $current->{'extra'}->{'type'}->{'content'} = address@hidden;
-      if ($normalized =~ /[^-]/) {
-        $current->{'extra'}->{'type'}->{'normalized'} = $normalized;
-        return 1;
-      }
+      $current->{'extra'}->{'type'}->{'normalized'} = $normalized;
+      return 1;
     }
   }
   $current->{'extra'}->{'type'}->{'normalized'} = '';
@@ -3212,12 +3209,7 @@
         }
       }
     } elsif ($command eq 'listoffloats') {
-      # Empty listoffloats is allowed
       _parse_float_type($current);
-      #if (!_parse_float_type($current)) {
-      #  $self->line_error (sprintf($self->__("address@hidden missing 
argument"), 
-      #     $command), $line_nr);
-      #}
     # handle all the other 'line' commands.  Here just check that they 
     # have an argument and prepare contents without spaces.
     } else {

Modified: trunk/tp/t/results/coverage/block_commands.pl
===================================================================
--- trunk/tp/t/results/coverage/block_commands.pl       2016-10-16 18:13:14 UTC 
(rev 7457)
+++ trunk/tp/t/results/coverage/block_commands.pl       2016-10-16 19:50:56 UTC 
(rev 7458)
@@ -381,7 +381,7 @@
           'content' => [
             {}
           ],
-          'normalized' => 'a-float'
+          'normalized' => 'a float'
         }
       },
       'line_nr' => {
@@ -507,7 +507,7 @@
 
 
 $result_floats{'block_commands'} = {
-  'a-float' => [
+  'a float' => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -532,15 +532,15 @@
               'text' => 'a float'
             }
           ],
-          'normalized' => 'a-float'
+          'normalized' => 'a float'
         }
       },
       'number' => 1
     }
   ]
 };
-$result_floats{'block_commands'}{'a-float'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'block_commands'}{'a-float'}[0];
-$result_floats{'block_commands'}{'a-float'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = $result_floats{'block_commands'}{'a-float'}[0];
+$result_floats{'block_commands'}{'a 
float'}[0]{'extra'}{'caption'}{'extra'}{'float'} = 
$result_floats{'block_commands'}{'a float'}[0];
+$result_floats{'block_commands'}{'a 
float'}[0]{'extra'}{'end_command'}{'extra'}{'command'} = 
$result_floats{'block_commands'}{'a float'}[0];
 
 
 
@@ -582,7 +582,7 @@
 <para>in quotation
 </para></quotation>
 
-<float name="b-float" type="a-float" number="1" spaces=" " endspaces=" 
"><floattype>a float</floattype><floatname spaces=" ">b float</floatname>
+<float name="b-float" type="a float" number="1" spaces=" " endspaces=" 
"><floattype>a float</floattype><floatname spaces=" ">b float</floatname>
 <para>In float
 </para>
 

Modified: trunk/tp/t/results/coverage/punctuation_in_line_commands.pl
===================================================================
--- trunk/tp/t/results/coverage/punctuation_in_line_commands.pl 2016-10-16 
18:13:14 UTC (rev 7457)
+++ trunk/tp/t/results/coverage/punctuation_in_line_commands.pl 2016-10-16 
19:50:56 UTC (rev 7458)
@@ -552,7 +552,7 @@
               'content' => [
                 {}
               ],
-              'normalized' => 'float-type_0021-After-punc'
+              'normalized' => 'float type! After punc'
             }
           },
           'line_nr' => {
@@ -723,7 +723,7 @@
               'content' => [
                 {}
               ],
-              'normalized' => 'float-type_0021-After-punc'
+              'normalized' => 'float type! After punc'
             }
           },
           'line_nr' => {
@@ -774,7 +774,7 @@
               'content' => [
                 {}
               ],
-              'normalized' => 'float-type_0021-After-punc'
+              'normalized' => 'float type! After punc'
             }
           },
           'line_nr' => {
@@ -1391,7 +1391,7 @@
 
 
 $result_floats{'punctuation_in_line_commands'} = {
-  'float-type_0021-After-punc' => [
+  'float type! After punc' => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -1421,7 +1421,7 @@
               'text' => 'float type! After punc'
             }
           ],
-          'normalized' => 'float-type_0021-After-punc'
+          'normalized' => 'float type! After punc'
         }
       },
       'number' => 1
@@ -1451,18 +1451,18 @@
               'text' => 'float type! After punc'
             }
           ],
-          'normalized' => 'float-type_0021-After-punc'
+          'normalized' => 'float type! After punc'
         }
       },
       'number' => 2
     }
   ]
 };
-$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = 
$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[0];
-$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[0]{'extra'}{'shortcaption'}{'extra'}{'float'}
 = 
$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[0];
-$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[1]{'extra'}{'caption'}{'extra'}{'float'}
 = 
$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[1];
-$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[1]{'extra'}{'end_command'}{'extra'}{'command'}
 = 
$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[1];
-$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[1]{'extra'}{'float_section'}
 = 
$result_floats{'punctuation_in_line_commands'}{'float-type_0021-After-punc'}[0]{'extra'}{'float_section'};
+$result_floats{'punctuation_in_line_commands'}{'float type! After 
punc'}[0]{'extra'}{'end_command'}{'extra'}{'command'} = 
$result_floats{'punctuation_in_line_commands'}{'float type! After punc'}[0];
+$result_floats{'punctuation_in_line_commands'}{'float type! After 
punc'}[0]{'extra'}{'shortcaption'}{'extra'}{'float'} = 
$result_floats{'punctuation_in_line_commands'}{'float type! After punc'}[0];
+$result_floats{'punctuation_in_line_commands'}{'float type! After 
punc'}[1]{'extra'}{'caption'}{'extra'}{'float'} = 
$result_floats{'punctuation_in_line_commands'}{'float type! After punc'}[1];
+$result_floats{'punctuation_in_line_commands'}{'float type! After 
punc'}[1]{'extra'}{'end_command'}{'extra'}{'command'} = 
$result_floats{'punctuation_in_line_commands'}{'float type! After punc'}[1];
+$result_floats{'punctuation_in_line_commands'}{'float type! After 
punc'}[1]{'extra'}{'float_section'} = 
$result_floats{'punctuation_in_line_commands'}{'float type! After 
punc'}[0]{'extra'}{'float_section'};
 
 
 
@@ -1573,17 +1573,17 @@
 </para><exdent spaces=" ">exdent quotation! After punc</exdent>
 </quotation>
 
-<float name="float-label_0021-After-punc" type="float-type_0021-After-punc" 
number="1" spaces=" " endspaces=" "><floattype>float type! After 
punc</floattype><floatname spaces=" ">float label! After punc</floatname>
+<float name="float-label_0021-After-punc" type="float type! After punc" 
number="1" spaces=" " endspaces=" "><floattype>float type! After 
punc</floattype><floatname spaces=" ">float label! After punc</floatname>
 <para>In float
 </para><shortcaption><para>shortcaption! After punc</para></shortcaption>
 </float>
 
-<float name="label-with-caption" type="float-type_0021-After-punc" number="2" 
spaces=" " endspaces=" "><floattype>float type! After 
punc</floattype><floatname spaces=" ">label with caption</floatname>
+<float name="label-with-caption" type="float type! After punc" number="2" 
spaces=" " endspaces=" "><floattype>float type! After 
punc</floattype><floatname spaces=" ">label with caption</floatname>
 <para>In float with caption.
 </para><caption><para>caption! After punc</para></caption>
 </float>
 
-<listoffloats type="float-type_0021-After-punc" spaces=" ">float type! After 
punc</listoffloats>
+<listoffloats type="float type! After punc" spaces=" ">float type! After 
punc</listoffloats>
 
 <cindex index="cp" spaces=" "><indexterm index="cp" number="1">index! After 
punc</indexterm></cindex>
 

Modified: trunk/tp/t/results/float/comment_space_comand_in_float.pl
===================================================================
--- trunk/tp/t/results/float/comment_space_comand_in_float.pl   2016-10-16 
18:13:14 UTC (rev 7457)
+++ trunk/tp/t/results/float/comment_space_comand_in_float.pl   2016-10-16 
19:50:56 UTC (rev 7458)
@@ -187,7 +187,7 @@
                 {},
                 {}
               ],
-              'normalized' => 'Text--'
+              'normalized' => 'Text @ '
             }
           },
           'line_nr' => {
@@ -255,7 +255,7 @@
                 {},
                 {}
               ],
-              'normalized' => 'Text--'
+              'normalized' => 'Text @ '
             }
           },
           'line_nr' => {
@@ -393,7 +393,7 @@
 
 
 $result_floats{'comment_space_comand_in_float'} = {
-  'Text--' => [
+  'Text @ ' => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -415,14 +415,14 @@
               'cmdname' => ' '
             }
           ],
-          'normalized' => 'Text--'
+          'normalized' => 'Text @ '
         }
       },
       'number' => 1
     }
   ]
 };
-$result_floats{'comment_space_comand_in_float'}{'Text--'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = $result_floats{'comment_space_comand_in_float'}{'Text--'}[0];
+$result_floats{'comment_space_comand_in_float'}{'Text @ 
'}[0]{'extra'}{'end_command'}{'extra'}{'command'} = 
$result_floats{'comment_space_comand_in_float'}{'Text @ '}[0];
 
 
 

Modified: trunk/tp/t/results/float/float_copying.pl
===================================================================
--- trunk/tp/t/results/float/float_copying.pl   2016-10-16 18:13:14 UTC (rev 
7457)
+++ trunk/tp/t/results/float/float_copying.pl   2016-10-16 19:50:56 UTC (rev 
7458)
@@ -660,7 +660,7 @@
                   'content' => [
                     {}
                   ],
-                  'normalized' => 'Copyright-notice'
+                  'normalized' => 'Copyright notice'
                 }
               },
               'line_nr' => {
@@ -1085,7 +1085,7 @@
               'content' => [
                 {}
               ],
-              'normalized' => 'Copyright-notice'
+              'normalized' => 'Copyright notice'
             }
           },
           'line_nr' => {
@@ -1613,7 +1613,7 @@
 
 
 $result_floats{'float_copying'} = {
-  'Copyright-notice' => [
+  'Copyright notice' => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -1638,15 +1638,15 @@
               'text' => 'Copyright notice'
             }
           ],
-          'normalized' => 'Copyright-notice'
+          'normalized' => 'Copyright notice'
         }
       },
       'number' => 1
     }
   ]
 };
-$result_floats{'float_copying'}{'Copyright-notice'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'float_copying'}{'Copyright-notice'}[0];
-$result_floats{'float_copying'}{'Copyright-notice'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = $result_floats{'float_copying'}{'Copyright-notice'}[0];
+$result_floats{'float_copying'}{'Copyright 
notice'}[0]{'extra'}{'caption'}{'extra'}{'float'} = 
$result_floats{'float_copying'}{'Copyright notice'}[0];
+$result_floats{'float_copying'}{'Copyright 
notice'}[0]{'extra'}{'end_command'}{'extra'}{'command'} = 
$result_floats{'float_copying'}{'Copyright notice'}[0];
 
 
 

Modified: trunk/tp/t/results/float/float_with_at_commands.pl
===================================================================
--- trunk/tp/t/results/float/float_with_at_commands.pl  2016-10-16 18:13:14 UTC 
(rev 7457)
+++ trunk/tp/t/results/float/float_with_at_commands.pl  2016-10-16 19:50:56 UTC 
(rev 7458)
@@ -346,7 +346,7 @@
             {},
             {}
           ],
-          'normalized' => 'entr_00e9e'
+          'normalized' => 'address@hidden'ee'
         }
       },
       'line_nr' => {},
@@ -427,7 +427,7 @@
             {},
             {}
           ],
-          'normalized' => 'entr_00e9e'
+          'normalized' => 'address@hidden'ee'
         }
       },
       'line_nr' => {},
@@ -559,7 +559,7 @@
 
 
 $result_floats{'float_with_at_commands'} = {
-  'entr_00e9e' => [
+  'address@hidden'ee' => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -590,15 +590,15 @@
               'text' => 'e'
             }
           ],
-          'normalized' => 'entr_00e9e'
+          'normalized' => 'address@hidden'ee'
         }
       },
       'number' => 1
     }
   ]
 };
-$result_floats{'float_with_at_commands'}{'entr_00e9e'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'float_with_at_commands'}{'entr_00e9e'}[0];
-$result_floats{'float_with_at_commands'}{'entr_00e9e'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = $result_floats{'float_with_at_commands'}{'entr_00e9e'}[0];
+$result_floats{'float_with_at_commands'}{'address@hidden'ee'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'float_with_at_commands'}{'address@hidden'ee'}[0];
+$result_floats{'float_with_at_commands'}{'address@hidden'ee'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = $result_floats{'float_with_at_commands'}{'address@hidden'ee'}[0];
 
 
 

Modified: trunk/tp/t/results/float/listoffloats_with_commands.pl
===================================================================
--- trunk/tp/t/results/float/listoffloats_with_commands.pl      2016-10-16 
18:13:14 UTC (rev 7457)
+++ trunk/tp/t/results/float/listoffloats_with_commands.pl      2016-10-16 
19:50:56 UTC (rev 7458)
@@ -93,7 +93,7 @@
             {},
             {}
           ],
-          'normalized' => 'th_00e9or_00e8me'
+          'normalized' => 'address@hidden'address@hidden'
         }
       },
       'line_nr' => {},

Modified: trunk/tp/t/results/float/numbering_captions_listoffloats.pl
===================================================================
--- trunk/tp/t/results/float/numbering_captions_listoffloats.pl 2016-10-16 
18:13:14 UTC (rev 7457)
+++ trunk/tp/t/results/float/numbering_captions_listoffloats.pl 2016-10-16 
19:50:56 UTC (rev 7458)
@@ -2645,7 +2645,7 @@
                 {},
                 {}
               ],
-              'normalized' => 'th_00e9or_00e8me'
+              'normalized' => 'address@hidden'address@hidden'
             }
           },
           'line_nr' => {},
@@ -6391,7 +6391,7 @@
                 {},
                 {}
               ],
-              'normalized' => 'th_00e9or_00e8me'
+              'normalized' => 'address@hidden'address@hidden'
             }
           },
           'line_nr' => {},
@@ -9204,7 +9204,7 @@
       'number' => '1.1'
     }
   ],
-  'th_00e9or_00e8me' => [
+  'address@hidden'address@hidden' => [
     {
       'cmdname' => 'float',
       'extra' => {
@@ -9242,7 +9242,7 @@
               'text' => 'me'
             }
           ],
-          'normalized' => 'th_00e9or_00e8me'
+          'normalized' => 'address@hidden'address@hidden'
         }
       },
       'number' => '1.1'
@@ -9313,9 +9313,9 @@
 
$result_floats{'numbering_captions_listoffloats'}{'Warning'}[1]{'extra'}{'end_command'}{'extra'}{'command'}
 = $result_floats{'numbering_captions_listoffloats'}{'Warning'}[1];
 
$result_floats{'numbering_captions_listoffloats'}{'Warning'}[1]{'extra'}{'float_section'}
 = 
$result_floats{'numbering_captions_listoffloats'}{''}[5]{'extra'}{'float_section'};
 
$result_floats{'numbering_captions_listoffloats'}{'Warning'}[1]{'extra'}{'shortcaption'}{'extra'}{'float'}
 = $result_floats{'numbering_captions_listoffloats'}{'Warning'}[1];
-$result_floats{'numbering_captions_listoffloats'}{'th_00e9or_00e8me'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = $result_floats{'numbering_captions_listoffloats'}{'th_00e9or_00e8me'}[0];
-$result_floats{'numbering_captions_listoffloats'}{'th_00e9or_00e8me'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = $result_floats{'numbering_captions_listoffloats'}{'th_00e9or_00e8me'}[0];
-$result_floats{'numbering_captions_listoffloats'}{'th_00e9or_00e8me'}[0]{'extra'}{'float_section'}
 = 
$result_floats{'numbering_captions_listoffloats'}{''}[5]{'extra'}{'float_section'};
+$result_floats{'numbering_captions_listoffloats'}{'address@hidden'address@hidden'}[0]{'extra'}{'caption'}{'extra'}{'float'}
 = 
$result_floats{'numbering_captions_listoffloats'}{'address@hidden'address@hidden'}[0];
+$result_floats{'numbering_captions_listoffloats'}{'address@hidden'address@hidden'}[0]{'extra'}{'end_command'}{'extra'}{'command'}
 = 
$result_floats{'numbering_captions_listoffloats'}{'address@hidden'address@hidden'}[0];
+$result_floats{'numbering_captions_listoffloats'}{'address@hidden'address@hidden'}[0]{'extra'}{'float_section'}
 = 
$result_floats{'numbering_captions_listoffloats'}{''}[5]{'extra'}{'float_section'};
 
 
 

Modified: trunk/tp/t/results/misc_commands/comment_space_command_on_line.pl
===================================================================
--- trunk/tp/t/results/misc_commands/comment_space_command_on_line.pl   
2016-10-16 18:13:14 UTC (rev 7457)
+++ trunk/tp/t/results/misc_commands/comment_space_command_on_line.pl   
2016-10-16 19:50:56 UTC (rev 7458)
@@ -681,7 +681,7 @@
                 {},
                 {}
               ],
-              'normalized' => 'Text--'
+              'normalized' => 'Text @ '
             }
           },
           'line_nr' => {
@@ -1106,7 +1106,7 @@
 <para>float
 </para></float> <!-- c end -->
 
-<listoffloats type="Text--" spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
+<listoffloats type="Text @ " spaces=" ">Text <spacecmd 
type="spc"/></listoffloats><!-- c listoffloats -->
 
 </top>
 <bye></bye>




reply via email to

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