texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_spe


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (_default_format_special_element_body): make $element an optional argument, it is not used much.
Date: Sat, 22 Jan 2022 18:24:57 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new cd2cf2b76e * tp/Texinfo/Convert/HTML.pm 
(_default_format_special_element_body): make $element an optional argument, it 
is not used much.
cd2cf2b76e is described below

commit cd2cf2b76ef9f1c4c4f0e932bc3e22d4c1d628e8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 23 00:24:46 2022 +0100

    * tp/Texinfo/Convert/HTML.pm (_default_format_special_element_body):
    make $element an optional argument, it is not used much.
    
    * tp/init/chm.pm: set PROGRAM_NAME_IN_FOOTER to 0 but use the default
    format_end_file.
---
 ChangeLog                                          |  8 ++++++
 tp/TODO                                            | 32 ++++++++++++++++------
 tp/Texinfo/Convert/HTML.pm                         |  5 ++--
 tp/init/chm.pm                                     | 16 ++---------
 tp/init/latex2html.pm                              |  2 +-
 .../layout/res_parser/formatting_chm/chapter.html  |  4 +--
 .../layout/res_parser/formatting_chm/chapter2.html |  4 +--
 .../res_parser/formatting_chm/formatting.html      |  4 +--
 .../res_parser/formatting_chm/formatting_abt.html  |  4 +--
 .../res_parser/formatting_chm/formatting_ovr.html  |  4 +--
 .../res_parser/formatting_chm/formatting_toc.html  |  4 +--
 .../formatting_chm/s_002d_002dect_002cion.html     |  4 +--
 .../res_parser/formatting_chm/subsection.html      |  4 +--
 ...tion-_0060_0060simple_002ddouble_002d_002d.html |  4 +--
 ...02d_002dfour_002d_002d_002d_002d_0027_0027.html |  4 +--
 15 files changed, 57 insertions(+), 46 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e60657b474..29c7425f05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-01-22  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_default_format_special_element_body):
+       make $element an optional argument, it is not used much.
+
+       * tp/init/chm.pm: set PROGRAM_NAME_IN_FOOTER to 0 but use the default
+       format_end_file.
+
 2022-01-22  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (top_block_command), tp/init/html32.pm:
diff --git a/tp/TODO b/tp/TODO
index d0432511ca..e0455e1bb5 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -27,8 +27,6 @@ Add a registering function for:
 %$Texinfo::Config::texinfo_code_types
 Texinfo::Config::commands_translation{$context}->{$command}
 
-Use an accessor for css_import_lines, css_rule_lines?
-
 Some internal state used in conversion:
  _convert_anchor_command:
   $self->{'multiple_pass'}
@@ -54,8 +52,6 @@ Some internal state used in conversion:
  _convert_special_element_type
   $self->{'counter_in_file'}->{$element->{'structure'}->{'unit_filename'}} == 1
 
- _default_format_button
-  $self->{'current_root_element'} (for from_element_direction())
  _default_format_element_header
   $self->{'counter_in_file'}->{$tree_unit->{'structure'}->{'unit_filename'}}
  _default_format_titlepage
@@ -70,9 +66,6 @@ Some internal state used in conversion:
   $self->{'jslicenses_infojs'}
   $self->{'jslicenses_math'}
 
- _default_panel_button_dynamic_direction
-  $self->{'current_root_element'} (for from_element_direction())
-
 Some private function used in conversion
  _convert_informative_command
   _translate_names
@@ -96,7 +89,30 @@ Some private variables used in conversion
  _convert_menu_entry_type
   $html_menu_entry_index
 
-in page_head, use $self->title_string() 
+init/chm.pm
+ chm_init
+  $self->{'document_name'}
+  $self->{'destination_directory'}
+  $self->{'title_tree'}
+ 
+init/epub3.pm
+  $self->{'title_tree'}
+
+init/highlight_syntax.pm
+init/latex2html.pm
+init/tex4ht.pm
+  $self->{'document_name'}
+  $self->{'destination_directory'}
+
+init/tex4ht.pm
+  $self->{'css_import_lines'}
+
+t/init/command_translation_modified.init
+  $commands_translation{'normal'}->{'error'} 
+
+t/init/cvs.init
+  $texinfo_code_types->{'menu_comment'} = 1;
+
 
 To document:
 -----------
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 8eefe795a2..ea052a73d7 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8256,13 +8256,12 @@ sub _default_format_footnotes_text($)
   my $level = $self->get_conf('FOOTNOTE_END_HEADER_LEVEL');
   $result .= &{$self->{'format_heading_text'}}($self, undef, 
[$class.'-heading'],
                                         $footnote_heading, $level)."\n";
-  $result .= &{$self->{'format_special_element_body'}}($self, 'footnotes',
-                                              $self->{'current_root_element'});
+  $result .= &{$self->{'format_special_element_body'}}($self, 'footnotes');
   $result .= "</div>\n";
   return $result;
 }
 
-sub _default_format_special_element_body($$$)
+sub _default_format_special_element_body($$;$)
 {
   my $self = shift;
   my $special_type = shift;
diff --git a/tp/init/chm.pm b/tp/init/chm.pm
index ea4ec0bdbb..7c7147e8b4 100644
--- a/tp/init/chm.pm
+++ b/tp/init/chm.pm
@@ -57,10 +57,11 @@ texinfo_set_from_init_file('HEADERS', 0);
 
 texinfo_set_from_init_file('footnotestyle', 'end');
 
+texinfo_set_from_init_file('PROGRAM_NAME_IN_FOOTER', 0);
+
 #FIXME remove that later?
 texinfo_set_from_init_file('USE_NODES', 0);
 
-texinfo_register_formatting_function('format_end_file', \&chm_format_end_file);
 texinfo_register_formatting_function('format_navigation_header', \&chm_noop);
 texinfo_register_formatting_function('format_navigation_panel', \&chm_noop);
 
@@ -184,19 +185,6 @@ foreach my $thing ('OE', 'oe', 'euro') {
                    $Texinfo::Convert::Unicode::unicode_entities{$thing});
 }
 
-sub chm_format_end_file($)
-{
-  my $self = shift;
-  my $pre_body_close = $self->get_conf('PRE_BODY_CLOSE');
-  $pre_body_close = '' if (!defined($pre_body_close));
-  return "<p>
-$pre_body_close
-</p>
-</body>
-</html>
-";
-}
-
 sub chm_noop($$)
 {
   return '';
diff --git a/tp/init/latex2html.pm b/tp/init/latex2html.pm
index fe93952004..00c0a9d7f8 100644
--- a/tp/init/latex2html.pm
+++ b/tp/init/latex2html.pm
@@ -452,7 +452,7 @@ sub l2h_change_image_file_names($$)
       }
       $l2h_img{$src} = $dest;
     }
-  $content =~ s/SRC="$src"/SRC="$dest"/g;
+    $content =~ s/SRC="$src"/SRC="$dest"/g;
   }
   return $content;
 }
diff --git a/tp/tests/layout/res_parser/formatting_chm/chapter.html 
b/tp/tests/layout/res_parser/formatting_chm/chapter.html
index ef0045040e..13b30ef0ce 100644
--- a/tp/tests/layout/res_parser/formatting_chm/chapter.html
+++ b/tp/tests/layout/res_parser/formatting_chm/chapter.html
@@ -4691,8 +4691,8 @@ Invalid use of @':
 <h5><a id="FOOT10" href="#DOCF10">(12)</a></h5>
 <p>in footnote</p>
 </div>
-<p>
 
-</p>
+
+
 </body>
 </html>
diff --git a/tp/tests/layout/res_parser/formatting_chm/chapter2.html 
b/tp/tests/layout/res_parser/formatting_chm/chapter2.html
index a8882c29be..b544dc3631 100644
--- a/tp/tests/layout/res_parser/formatting_chm/chapter2.html
+++ b/tp/tests/layout/res_parser/formatting_chm/chapter2.html
@@ -1341,8 +1341,8 @@ h1.centerchap {text-align:center}
 </div>
 
 </div>
-<p>
 
-</p>
+
+
 </body>
 </html>
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting.html 
b/tp/tests/layout/res_parser/formatting_chm/formatting.html
index c1cc8e1f15..5112331570 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting.html
@@ -2884,8 +2884,8 @@ html ''
 <h5><a id="FOOT2" href="#DOCF2">(4)</a></h5>
 <p>in footnote2</p>
 </div>
-<p>
 
-</p>
+
+
 </body>
 </html>
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html 
b/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html
index 5cc61006cd..40eab0facb 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting_abt.html
@@ -911,8 +911,8 @@ truc: after a deff item
   </li>
 </ul>
 
-</div><p>
+</div>
+
 
-</p>
 </body>
 </html>
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html 
b/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html
index bd74342f32..b3816e070a 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting_ovr.html
@@ -818,8 +818,8 @@ ul.toc-numbered-mark {list-style: none}
 <li><a id="stoc-chapter-2" href="chapter2.html" rel="index">chapter 2</a></li>
 </ul>
 </div>
-</div><p>
+</div>
+
 
-</p>
 </body>
 </html>
diff --git a/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html 
b/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html
index e19bda432f..1ea403cec7 100644
--- a/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html
+++ b/tp/tests/layout/res_parser/formatting_chm/formatting_toc.html
@@ -829,8 +829,8 @@ ul.toc-numbered-mark {list-style: none}
   <li><a id="toc-chapter-2" href="chapter2.html" rel="index">chapter 2</a></li>
 </ul>
 </div>
-</div><p>
+</div>
+
 
-</p>
 </body>
 </html>
diff --git 
a/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html 
b/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html
index 02e8c6cf15..020379f654 100644
--- a/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html
+++ b/tp/tests/layout/res_parser/formatting_chm/s_002d_002dect_002cion.html
@@ -813,8 +813,8 @@ truc: after a deff item
 
 
 </div>
-<p>
 
-</p>
+
+
 </body>
 </html>
diff --git a/tp/tests/layout/res_parser/formatting_chm/subsection.html 
b/tp/tests/layout/res_parser/formatting_chm/subsection.html
index b0e0bef6ea..bd86bfa202 100644
--- a/tp/tests/layout/res_parser/formatting_chm/subsection.html
+++ b/tp/tests/layout/res_parser/formatting_chm/subsection.html
@@ -814,8 +814,8 @@ truc: after a deff item
 
 <a class="anchor" id="anchor"></a>
 </div>
-<p>
 
-</p>
+
+
 </body>
 </html>
diff --git 
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
 
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
index ab309c51d4..c755d80ffd 100644
--- 
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
+++ 
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-_0060_0060simple_002ddouble_002d_002d.html
@@ -812,8 +812,8 @@ truc: after a deff item
 <h4 class="subsubsection" 
id="subsubsection-_0060_0060simple_002ddouble_002d_002d-1">1.1.1.1 
subsubsection &ldquo;simple-double&ndash;</h4>
 
 </div>
-<p>
 
-</p>
+
+
 </body>
 </html>
diff --git 
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
 
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
index ec88cbd1ed..a4688b6e77 100644
--- 
a/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
+++ 
b/tp/tests/layout/res_parser/formatting_chm/subsubsection-three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027.html
@@ -812,8 +812,8 @@ truc: after a deff item
 <h4 class="subsubsection" 
id="three_002d_002d_002dfour_002d_002d_002d_002d_0027_0027">1.1.1.2 
three&mdash;four&mdash;-&rdquo;</h4>
 
 </div>
-<p>
 
-</p>
+
+
 </body>
 </html>



reply via email to

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