texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_c


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/convert/convert_html.c (convert_command_simple_block) (commands_internal_conversion_table): implement convert_command_simple_block.
Date: Sun, 31 Dec 2023 04:16:39 -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 c44f6c5a55 * tp/Texinfo/XS/convert/convert_html.c 
(convert_command_simple_block) (commands_internal_conversion_table): implement 
convert_command_simple_block.
c44f6c5a55 is described below

commit c44f6c5a552947bd1eee0f732b4cdf9f7efd98eb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Dec 31 10:16:27 2023 +0100

    * tp/Texinfo/XS/convert/convert_html.c (convert_command_simple_block)
    (commands_internal_conversion_table): implement
    convert_command_simple_block.
---
 ChangeLog                            |  6 ++++++
 tp/Texinfo/XS/convert/convert_html.c | 26 ++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c4b0089464..edafe5cf15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-12-31  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/convert_html.c (convert_command_simple_block)
+       (commands_internal_conversion_table): implement
+       convert_command_simple_block.
+
 2023-12-30  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/convert_html.c
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index ed54b2f8ac..c658a28361 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -10178,6 +10178,28 @@ convert_verbatiminclude_command (CONVERTER *self, 
const enum command_id cmd,
     }
 }
 
+void
+convert_command_simple_block (CONVERTER *self, const enum command_id cmd,
+                    const ELEMENT *element,
+                    const HTML_ARGS_FORMATTED *args_formatted,
+                    const char *content, TEXT *result)
+{
+  if (!content)
+    return;
+
+  char *attribute_class;
+  STRING_LIST *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, "div", classes);
+  text_append (result, attribute_class);
+  text_append_n (result, ">", 1);
+  text_append (result, content);
+  text_append_n (result, "</div>", 6);
+  free (attribute_class);
+  destroy_strings_list (classes);
+}
+
 void
 convert_xref_commands (CONVERTER *self, const enum command_id cmd,
                     const ELEMENT *element,
@@ -11031,6 +11053,10 @@ static COMMAND_INTERNAL_CONVERSION 
commands_internal_conversion_table[] = {
   {CM_smallindentedblock, &convert_indented_command},
   {CM_verbatim, &convert_verbatim_command},
   {CM_displaymath, &convert_displaymath_command},
+  {CM_raggedright, &convert_command_simple_block},
+  {CM_flushleft, &convert_command_simple_block},
+  {CM_flushright, &convert_command_simple_block},
+  {CM_group, &convert_command_simple_block},
 
   {CM_verbatiminclude, &convert_verbatiminclude_command},
 



reply via email to

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