texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Thu, 2 May 2024 18:44:10 -0400 (EDT)

branch: master
commit c802d682880ccc0954565a32724f9f08115b9e0c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri May 3 00:43:40 2024 +0200

    * tp/Texinfo/XS/convert/convert_html.c
    (html_default_format_begin_file)
    (html_default_format_node_redirection_page): use empty string for
    PACKAGE_AND_VERSION and PACKAGE_URL if undefined.
    
    * tp/Texinfo/XS/convert/convert_html.c
    (default_format_special_body_about): add a new line.
---
 ChangeLog                                          | 10 ++++++++
 tp/Texinfo/XS/convert/convert_html.c               | 28 ++++++++++++++++++----
 .../res_html/chap_00ea.html                        |  2 +-
 .../conversion_with_undef_customization_abt.html   |  5 ++--
 .../res_html/index.html                            |  2 +-
 .../res_html/sec.html                              |  2 +-
 6 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 01a75cbb8f..2318cc0280 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-05-02  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/convert_html.c
+       (html_default_format_begin_file)
+       (html_default_format_node_redirection_page): use empty string for
+       PACKAGE_AND_VERSION and PACKAGE_URL if undefined.
+
+       * tp/Texinfo/XS/convert/convert_html.c
+       (default_format_special_body_about): add a new line.
+
 2024-05-02  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Makefile.tres, tp/t/html_tests.t
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index d35877e47e..d8140e2bcd 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -7173,6 +7173,8 @@ html_default_format_begin_file (CONVERTER *self, const 
char *filename,
   const ELEMENT *command_for_title = 0;
   BEGIN_FILE_INFORMATION *begin_info;
   TEXT result;
+  const char *package_and_version;
+  const char *package_url;
 
   if (output_unit)
     {
@@ -7198,9 +7200,16 @@ html_default_format_begin_file (CONVERTER *self, const 
char *filename,
     text_append (&result, self->conf->DOCTYPE.string);
   text_append_n (&result, "\n", 1);
   text_printf (&result, "<html%s>\n", 
begin_info->root_html_element_attributes);
+  if (self->conf->PACKAGE_AND_VERSION.string)
+    package_and_version = self->conf->PACKAGE_AND_VERSION.string;
+  else
+    package_and_version = "";
+  if (self->conf->PACKAGE_URL.string)
+    package_url = self->conf->PACKAGE_URL.string;
+  else
+    package_url = "";
   text_printf (&result, "<!-- Created by %s, %s -->\n<head>\n",
-                        self->conf->PACKAGE_AND_VERSION.string,
-                        self->conf->PACKAGE_URL.string);
+                        package_and_version, package_url);
   if (begin_info->encoding)
     text_append (&result, begin_info->encoding);
   text_append_n (&result, "\n", 1);
@@ -8256,6 +8265,8 @@ html_default_format_node_redirection_page (CONVERTER 
*self,
   TEXT result;
   TEXT body;
   BEGIN_FILE_INFORMATION *begin_info;
+  const char *package_and_version;
+  const char *package_url;
   char *href = html_command_href (self, element, filename, 0, 0);
   char *name = html_command_text (self, element, 0);
   ELEMENT *direction_element = new_element (ET__converted);
@@ -8283,11 +8294,18 @@ html_default_format_node_redirection_page (CONVERTER 
*self,
     text_append (&result, self->conf->DOCTYPE.string);
   text_append_n (&result, "\n", 1);
   text_printf (&result, "<html%s>\n", 
begin_info->root_html_element_attributes);
+  if (self->conf->PACKAGE_AND_VERSION.string)
+    package_and_version = self->conf->PACKAGE_AND_VERSION.string;
+  else
+    package_and_version = "";
+  if (self->conf->PACKAGE_URL.string)
+    package_url = self->conf->PACKAGE_URL.string;
+  else
+    package_url = "";
   text_printf (&result, "<!-- Created by %s, %s -->\n"
        "<!-- This file redirects to the location of a node or anchor -->\n"
        "<head>\n",
-                        self->conf->PACKAGE_AND_VERSION.string,
-                        self->conf->PACKAGE_URL.string);
+                        package_and_version, package_url);
   if (begin_info->encoding)
     text_append (&result, begin_info->encoding);
   text_append_n (&result, "\n", 1);
@@ -15566,7 +15584,7 @@ default_format_special_body_about (CONVERTER *self,
       translate_convert_to_html_internal (
                "There are no buttons for this document.", self, 0, 0,
                 result, "ABOUT");
-      text_append_n (result, "</p>\n", 5);
+      text_append_n (result, "\n</p>\n", 6);
       return;
     }
 
diff --git 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/chap_00ea.html
 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/chap_00ea.html
index fe6259edb3..cb87ec33bc 100644
--- 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/chap_00ea.html
+++ 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/chap_00ea.html
@@ -1,6 +1,6 @@
 
 <html>
-<!-- Created by (null), http://www.gnu.org/software/texinfo/ -->
+<!-- Created by , http://www.gnu.org/software/texinfo/ -->
 <head>
 
 <title>chap&ecirc; (top)</title>
diff --git 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/conversion_with_undef_customization_abt.html
 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/conversion_with_undef_customization_abt.html
index c4b54a50e2..6334b45b87 100644
--- 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/conversion_with_undef_customization_abt.html
+++ 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/conversion_with_undef_customization_abt.html
@@ -1,6 +1,6 @@
 
 <html>
-<!-- Created by (null), http://www.gnu.org/software/texinfo/ -->
+<!-- Created by , http://www.gnu.org/software/texinfo/ -->
 <head>
 
 <title>About This Document (top)</title>
@@ -29,7 +29,8 @@ span.program-in-footer {font-size: smaller}
 <h2 class="about-heading">About This Document</h2>
 
 <p>
-There are no buttons for this document.</p>
+There are no buttons for this document.
+</p>
 </div><p>
   <span class="program-in-footer">This document was generated on <em 
class="emph">a sunny day</em>.</span>
 </p>
diff --git 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/index.html
 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/index.html
index a0d2523ef6..e89b509e53 100644
--- 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/index.html
+++ 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/index.html
@@ -1,6 +1,6 @@
 
 <html>
-<!-- Created by (null), http://www.gnu.org/software/texinfo/ -->
+<!-- Created by , http://www.gnu.org/software/texinfo/ -->
 <head>
 
 <title>Top (top)</title>
diff --git 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/sec.html
 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/sec.html
index 57ec0675f2..8025df4edb 100644
--- 
a/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/sec.html
+++ 
b/tp/t/results/converters_tests/conversion_with_undef_customization/res_html/sec.html
@@ -1,6 +1,6 @@
 
 <html>
-<!-- Created by (null), http://www.gnu.org/software/texinfo/ -->
+<!-- Created by , http://www.gnu.org/software/texinfo/ -->
 <head>
 
 <title>sec (top)</title>



reply via email to

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