[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_m
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_menu_command) (commands_internal_conversion_table): implement convert_menu_command. |
Date: |
Sun, 31 Dec 2023 08:22:02 -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 d9748e9c65 * tp/Texinfo/XS/convert/convert_html.c
(convert_menu_command) (commands_internal_conversion_table): implement
convert_menu_command.
d9748e9c65 is described below
commit d9748e9c653a85546bdf35c29a752ad91a72965d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Dec 31 14:22:01 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c (convert_menu_command)
(commands_internal_conversion_table): implement convert_menu_command.
---
ChangeLog | 5 ++++
tp/Texinfo/XS/convert/convert_html.c | 48 ++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 1a9a3bcced..75a94ad1e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-12-31 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (convert_menu_command)
+ (commands_internal_conversion_table): implement convert_menu_command.
+
2023-12-31 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/convert_html.c (convert_footnote_command):
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 16c787ada8..8e4a714a39 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -10581,6 +10581,52 @@ convert_listoffloats_command (CONVERTER *self, const
enum command_id cmd,
}
}
+void
+convert_menu_command (CONVERTER *self, const enum command_id cmd,
+ const ELEMENT *element,
+ const HTML_ARGS_FORMATTED *args_formatted,
+ const char *content, TEXT *result)
+{
+ char *attribute_class;
+ STRING_LIST *classes;
+
+ if (cmd == CM_detailmenu)
+ {
+ if (content)
+ text_append (result, content);
+ return;
+ }
+
+ self->shared_conversion_state.html_menu_entry_index = 0;
+
+ if (!content || content[strspn (content, whitespace_chars)] == '\0')
+ return;
+
+ if (html_in_string (self))
+ {
+ text_append (result, content);
+ return;
+ }
+
+ classes = (STRING_LIST *) malloc (sizeof (STRING_LIST));
+ memset (classes, 0, sizeof (STRING_LIST));
+ add_string (builtin_command_name (cmd), classes);
+
+ attribute_class = html_attribute_class (self, "table", classes);
+ text_append (result, attribute_class);
+ text_append (result, " border=\"0\" cellspacing=\"0\">");
+ if (html_inside_preformatted (self))
+ text_append_n (result, "<tr><td>", 8);
+ text_append_n (result, "\n", 1);
+ text_append (result, content);
+ if (html_inside_preformatted (self))
+ text_append_n (result, "</td></tr>", 10);
+ text_append_n (result, "</table>\n", 9);
+
+ free (attribute_class);
+ destroy_strings_list (classes);
+}
+
void
convert_xref_commands (CONVERTER *self, const enum command_id cmd,
const ELEMENT *element,
@@ -11438,6 +11484,8 @@ static COMMAND_INTERNAL_CONVERSION
commands_internal_conversion_table[] = {
{CM_flushleft, &convert_command_simple_block},
{CM_flushright, &convert_command_simple_block},
{CM_group, &convert_command_simple_block},
+ {CM_menu, &convert_menu_command},
+ {CM_detailmenu, &convert_menu_command},
{CM_verbatiminclude, &convert_verbatiminclude_command},
{CM_sp, &convert_sp_command},
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_menu_command) (commands_internal_conversion_table): implement convert_menu_command.,
Patrice Dumas <=