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, 4 Jan 2024 13:17:01 -0500 (EST)

branch: master
commit 8bf4856497848ac70a8d87f53d5304f48f88973e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jan 4 19:05:52 2024 +0100

    * tp/Texinfo/XS/convert/convert_html.c (convert_balanced_braces_type)
    (convert_index_entry_command_type, types_internal_conversion_table):
    implement convert_balanced_braces_type and
    convert_index_entry_command_type.
---
 ChangeLog                            |  7 +++++++
 tp/Texinfo/XS/convert/convert_html.c | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c9cea857b5..212bd24956 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-01-04  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/convert_html.c (convert_balanced_braces_type)
+       (convert_index_entry_command_type, types_internal_conversion_table):
+       implement convert_balanced_braces_type and
+       convert_index_entry_command_type.
+
 2024-01-04  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/utils.c (free_option): free icons and strings,
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index 0a89cf8924..c8c6e6722f 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -12960,6 +12960,36 @@ convert_preformatted_type (CONVERTER *self, const enum 
element_type type,
     text_append_n (result, "</dd>", 5);
 }
 
+void
+convert_balanced_braces_type (CONVERTER *self, const enum element_type type,
+                       const ELEMENT *element, const char *content,
+                       TEXT *result)
+{
+  if (content)
+    text_append (result, content);
+}
+
+void
+convert_index_entry_command_type (CONVERTER *self, const enum element_type 
type,
+                       const ELEMENT *element, const char *content,
+                       TEXT *result)
+{
+  char *index_id;
+
+  if (html_in_string (self) || html_in_multi_expanded (self))
+    return;
+
+  index_id = html_command_id (self, element);
+
+  if (index_id && strlen (index_id))
+    {
+      format_separate_anchor (self, index_id, "index-entry-id", result);
+      if (!html_in_preformatted_context (self))
+        text_append_n (result, "\n", 1);
+    }
+}
+
+
 #define static_class(name, class) \
 static char * name ##_array[] = {#class}; \
 static const STRING_LIST name ##_classes = {name ##_array, 1, 1};
@@ -13372,7 +13402,9 @@ convert_row_type (CONVERTER *self, const enum 
element_type type,
 
 /* associate type to the C function implementing the conversion */
 static TYPE_INTERNAL_CONVERSION types_internal_conversion_table[] = {
+  {ET_balanced_braces, &convert_balanced_braces_type},
   {ET_def_line, &convert_def_line_type},
+  {ET_index_entry_command, &convert_index_entry_command_type},
   {ET_paragraph, &convert_paragraph_type},
   {ET_preformatted, &convert_preformatted_type},
   {ET_row, &convert_row_type},



reply via email to

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