[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Wed, 2 Oct 2024 07:37:15 -0400 (EDT) |
branch: master
commit ebb7b8dc5e41ad31af6618ac50446f87e31c644b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Jul 31 23:58:14 2024 +0200
* tp/Texinfo/XS/convert/convert_html.c (html_default_format_button):
fix handling of BST_string, BST_external_string, BIT_string and
BIT_external_string based on their new significations.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/convert/convert_html.c | 17 ++++++++++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2530a362a9..b6994542ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-31 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (html_default_format_button):
+ fix handling of BST_string, BST_external_string, BIT_string and
+ BIT_external_string based on their new significations.
+
2024-07-31 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/converter.c (html_get_direction_index),
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index ce0260d3bb..8497f0cdbc 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -8049,7 +8049,7 @@ html_default_format_button (CONVERTER *self,
malloc (sizeof (FORMATTED_BUTTON_INFO));
memset (formatted_button, 0, sizeof (FORMATTED_BUTTON_INFO));
- if (button->type == BST_string)
+ if (button->type == BST_external_string)
{
formatted_button->active
= get_perl_scalar_reference_value (button->b.sv_string);
@@ -8058,11 +8058,17 @@ html_default_format_button (CONVERTER *self,
else if (button->type == BST_direction_info)
{
int direction = button->b.button_info->direction;
- if (button->b.button_info->type == BIT_string)
+ if (button->b.button_info->type == BIT_external_string
+ || button->b.button_info->type == BIT_string)
{
/* use given text */
- char *text = get_perl_scalar_reference_value
+ char *text;
+ if (button->b.button_info->type == BIT_external_string)
+ text = get_perl_scalar_reference_value
(button->b.button_info->bi.sv_string);
+ else
+ text = strdup (button->b.button_info->bi.string);
+
if (text)
{
char *href = from_element_direction (self, direction,
@@ -8116,6 +8122,11 @@ html_default_format_button (CONVERTER *self,
}
formatted_button->need_delimiter = 1;
}
+ else if (button->type == BST_string)
+ {
+ formatted_button->active = strdup (button->b.string);
+ formatted_button->need_delimiter = 1;
+ }
/* for the next cases, button->type == BST_direction */
else if (button->b.direction == D_direction_Space)
{