texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Convert/HTML.pm t/16raw.t t/...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Convert/HTML.pm t/16raw.t t/...
Date: Sun, 29 May 2011 13:42:37 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/05/29 13:42:36

Modified files:
        tp/Texinfo/Convert: HTML.pm 
        tp/t           : 16raw.t 
        tp/t/include   : incl-incl.txi 
        tp/t/results/coverage: verbatiminclude.pl 
        tp/t/results/include: value_expansion_in_include.pl 
        tp/t/results/raw: misc_raw.pl 

Log message:
        Don't overprotect in verbatim and let it be preformatted.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/16raw.t?cvsroot=texinfo&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/include/incl-incl.txi?cvsroot=texinfo&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/verbatiminclude.pl?cvsroot=texinfo&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/include/value_expansion_in_include.pl?cvsroot=texinfo&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/raw/misc_raw.pl?cvsroot=texinfo&r1=1.19&r2=1.20

Patches:
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- Texinfo/Convert/HTML.pm     29 May 2011 13:15:21 -0000      1.63
+++ Texinfo/Convert/HTML.pm     29 May 2011 13:42:34 -0000      1.64
@@ -844,9 +844,12 @@
 $css_map{'pre.smallformat'} = $css_map{'pre.smalldisplay'};
 $css_map{'pre.smalllisp'} = $css_map{'pre.smallexample'};
 
+my %preformatted_commands_context = %preformatted_commands;
+$preformatted_commands_context{'verbatim'} = 1;
+
 my %pre_class_commands;
 my %pre_class_types;
-foreach my $preformatted_command (keys(%preformatted_commands)) {
+foreach my $preformatted_command (keys(%preformatted_commands_context)) {
   $pre_class_commands{$preformatted_command} = $preformatted_command;
 }
 $pre_class_commands{'menu'} = 'menu-preformatted';
@@ -1678,7 +1681,7 @@
   my $contents = shift;
 
   return $self->attribute_class('pre', $cmdname).'>' 
-          .$self->xml_protect_text($contents) . '</pre>';
+          .$contents . '</pre>';
 }
 
 $default_commands_conversion{'verbatim'} = \&_convert_verbatim_command;
@@ -4737,7 +4740,7 @@
       if (exists($block_commands{$command_name})) {
         push @{$self->{'formats'}}, $command_name;
       }
-      if ($preformatted_commands{$command_name}) {
+      if ($preformatted_commands_context{$command_name}) {
         push @{$self->{'preformatted_context'}}, $command_name;
       }
       if ($code_style_commands{$command_name} or 
@@ -4819,7 +4822,7 @@
         $result = &{$self->{'commands_conversion'}->{$command_name}}($self,
                 $command_name, $root, $content_formatted);
       }
-      if ($preformatted_commands{$command_name}) {
+      if ($preformatted_commands_context{$command_name}) {
         pop @{$self->{'preformatted_context'}};
       }
       if ($code_style_commands{$command_name} or 
@@ -4944,11 +4947,6 @@
    #   return $result;
 #    } elsif ($root->{'cmdname'} eq 'center') {
 #      #my ($counts, $new_locations);
- #   } elsif ($root->{'cmdname'} eq 'verbatiminclude') {
- #     my $expansion = $self->Texinfo::Parser::expand_verbatiminclude($root);
- #     unshift @{$self->{'current_contents'}->[-1]}, $expansion
- #       if ($expansion);
- #     return '';
 #    } elsif ($root->{'cmdname'} eq 'insertcopying') {
 #      if ($self->{'extra'} and $self->{'extra'}->{'copying'}) {
 #        unshift @{$self->{'current_contents'}->[-1]}, 
@@ -4956,7 +4954,6 @@
 #      }
 #      return '';
 #    } elsif ($root->{'cmdname'} eq 'listoffloats') {
-#    } elsif ($root->{'cmdname'} eq 'sp') {
 # TODO types
 #    } elsif ($root->{'type'} eq 'preformatted') {
  # TODO ?

Index: t/16raw.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/16raw.t,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- t/16raw.t   19 Mar 2011 16:20:31 -0000      1.16
+++ t/16raw.t   29 May 2011 13:42:34 -0000      1.17
@@ -14,13 +14,13 @@
 '],
 ['misc_raw','
 @html 
-in html @end html
+in html <br> @end html
 
 @tex in tex
 @end tex
 
 @verbatim
-in  v---erbatim``
+in  v---erbatim`` <>
 in verbatim2
 @end verbatim
 '],

Index: t/include/incl-incl.txi
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/include/incl-incl.txi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/include/incl-incl.txi     17 Oct 2010 19:59:32 -0000      1.1
+++ t/include/incl-incl.txi     29 May 2011 13:42:35 -0000      1.2
@@ -1 +1 @@
-This is the @emph{included} file (include-value2.txi).
+This is the @emph{included} file (include-value2.txi) <> ---. 

Index: t/results/coverage/verbatiminclude.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/verbatiminclude.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- t/results/coverage/verbatiminclude.pl       20 Mar 2011 13:00:32 -0000      
1.4
+++ t/results/coverage/verbatiminclude.pl       29 May 2011 13:42:35 -0000      
1.5
@@ -69,7 +69,7 @@
 
 
 
-$result_converted{'plaintext'}->{'verbatiminclude'} = 'This is the 
@emph{included} file (include-value2.txi).
+$result_converted{'plaintext'}->{'verbatiminclude'} = 'This is the 
@emph{included} file (include-value2.txi) <> ---.
 ';
 
 1;

Index: t/results/include/value_expansion_in_include.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/include/value_expansion_in_include.pl,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- t/results/include/value_expansion_in_include.pl     6 Mar 2011 14:44:02 
-0000       1.26
+++ t/results/include/value_expansion_in_include.pl     29 May 2011 13:42:36 
-0000      1.27
@@ -182,7 +182,7 @@
             },
             {
               'parent' => {},
-              'text' => ' file (include-value2.txi).
+              'text' => ' file (include-value2.txi) <> ---. 
 '
             }
           ],
@@ -282,7 +282,7 @@
             },
             {
               'parent' => {},
-              'text' => ' file (include-value2.txi).
+              'text' => ' file (include-value2.txi) <> ---. 
 '
             }
           ],
@@ -382,7 +382,7 @@
             },
             {
               'parent' => {},
-              'text' => ' file (include-value2.txi).
+              'text' => ' file (include-value2.txi) <> ---. 
 '
             }
           ],
@@ -547,17 +547,17 @@
 
 @node Top
 
-testvar include: This is the @emph{included} file (include-value2.txi).
+testvar include: This is the @emph{included} file (include-value2.txi) <> ---. 
 
 testvar verbatiminclude: @verbatiminclude incl-incl.txi
 
 
-test-var include: This is the @emph{included} file (include-value2.txi).
+test-var include: This is the @emph{included} file (include-value2.txi) <> 
---. 
 
 test-var verbatiminclude: @verbatiminclude incl-incl.txi
 
 
-test_var include: This is the @emph{included} file (include-value2.txi).
+test_var include: This is the @emph{included} file (include-value2.txi) <> 
---. 
 
 test_var verbatiminclude: @verbatiminclude incl-incl.txi
 ';
@@ -568,15 +568,15 @@
 
 
 
-testvar include: This is the included file (include-value2.txi).
+testvar include: This is the included file (include-value2.txi) <> ---. 
 
 testvar verbatiminclude: 
 
-test-var include: This is the included file (include-value2.txi).
+test-var include: This is the included file (include-value2.txi) <> ---. 
 
 test-var verbatiminclude: 
 
-test_var include: This is the included file (include-value2.txi).
+test_var include: This is the included file (include-value2.txi) <> ---. 
 
 test_var verbatiminclude: ';
 

Index: t/results/raw/misc_raw.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/raw/misc_raw.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- t/results/raw/misc_raw.pl   20 Mar 2011 13:00:47 -0000      1.19
+++ t/results/raw/misc_raw.pl   29 May 2011 13:42:36 -0000      1.20
@@ -23,7 +23,7 @@
         },
         {
           'parent' => {},
-          'text' => 'in html ',
+          'text' => 'in html <br> ',
           'type' => 'raw'
         }
       ],
@@ -91,7 +91,7 @@
         },
         {
           'parent' => {},
-          'text' => 'in  v---erbatim``
+          'text' => 'in  v---erbatim`` <>
 ',
           'type' => 'raw'
         },
@@ -137,13 +137,13 @@
 
 $result_texis{'misc_raw'} = '
 @html 
-in html @end html
+in html <br> @end html
 
 @tex in tex
 @end tex
 
 @verbatim
-in  v---erbatim``
+in  v---erbatim`` <>
 in verbatim2
 @end verbatim
 ';
@@ -152,7 +152,7 @@
 $result_texts{'misc_raw'} = '
 
 
-in  v---erbatim``
+in  v---erbatim`` <>
 in verbatim2
 ';
 
@@ -160,7 +160,7 @@
 
 
 
-$result_converted{'plaintext'}->{'misc_raw'} = 'in  v---erbatim``
+$result_converted{'plaintext'}->{'misc_raw'} = 'in  v---erbatim`` <>
 in verbatim2
 ';
 



reply via email to

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