[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (format_pr
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/convert_html.c (format_protect_text) (html_convert_css_string, html_initialize_output_state), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add current_format_protect_text function reference in converter to switch from html to css formatting in C in format_protect_text. |
Date: |
Sat, 09 Dec 2023 06:50:45 -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 e56e393c00 * tp/Texinfo/XS/convert/convert_html.c
(format_protect_text) (html_convert_css_string, html_initialize_output_state),
tp/Texinfo/XS/main/converter_types.h (CONVERTER): add
current_format_protect_text function reference in converter to switch from html
to css formatting in C in format_protect_text.
e56e393c00 is described below
commit e56e393c00134791f4f20fbd633583eeac824423
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Dec 9 12:50:37 2023 +0100
* tp/Texinfo/XS/convert/convert_html.c (format_protect_text)
(html_convert_css_string, html_initialize_output_state),
tp/Texinfo/XS/main/converter_types.h (CONVERTER): add
current_format_protect_text function reference in converter to switch
from html to css formatting in C in format_protect_text.
---
ChangeLog | 8 ++++++++
tp/Texinfo/XS/convert/convert_html.c | 7 ++++++-
tp/Texinfo/XS/main/converter_types.h | 3 ++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7b0712c5bd..4a556cf8de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-12-09 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/convert_html.c (format_protect_text)
+ (html_convert_css_string, html_initialize_output_state),
+ tp/Texinfo/XS/main/converter_types.h (CONVERTER): add
+ current_format_protect_text function reference in converter to switch
+ from html to css formatting in C in format_protect_text.
+
2023-12-09 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/call_html_perl_function.c
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index cade7cec09..80a25655b9 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -2203,7 +2203,7 @@ format_protect_text (CONVERTER *self, const char *text,
TEXT *result)
= &self->current_formatting_references[FR_format_protect_text];
if (formatting_reference->status == FRS_status_default_set)
{
- html_default_format_protect_text (text, result);
+ (*self->current_format_protect_text) (text, result);
}
else
{
@@ -6424,12 +6424,14 @@ html_convert_css_string (CONVERTER *self, const ELEMENT
*element, char *explanat
char *result;
HTML_DOCUMENT_CONTEXT *top_document_ctx;
+ void (* saved_current_format_protect_text) (const char *text, TEXT *result);
FORMATTING_REFERENCE *saved_formatting_references
= self->current_formatting_references;
COMMAND_CONVERSION_FUNCTION *saved_commands_conversion_function
= self->current_commands_conversion_function;
TYPE_CONVERSION_FUNCTION *saved_types_conversion_function
= self->current_types_conversion_function;
+ saved_current_format_protect_text = self->current_format_protect_text;
self->current_formatting_references
= &self->css_string_formatting_references[0];
@@ -6437,6 +6439,7 @@ html_convert_css_string (CONVERTER *self, const ELEMENT
*element, char *explanat
= &self->css_string_command_conversion_function[0];
self->current_types_conversion_function
= &self->css_string_type_conversion_function[0];
+ self->current_format_protect_text = &default_css_string_format_protect_text;
html_new_document_context (self, "css_string", 0, 0);
top_document_ctx = html_top_document_context (self);
@@ -6450,6 +6453,7 @@ html_convert_css_string (CONVERTER *self, const ELEMENT
*element, char *explanat
self->current_commands_conversion_function
= saved_commands_conversion_function;
self->current_types_conversion_function = saved_types_conversion_function;
+ self->current_format_protect_text = saved_current_format_protect_text;
return result;
}
@@ -7976,6 +7980,7 @@ html_initialize_output_state (CONVERTER *self, char
*context)
self->current_commands_conversion_function
= &self->command_conversion_function[0];
self->current_types_conversion_function = &self->type_conversion_function[0];
+ self->current_format_protect_text = &html_default_format_protect_text;
/* FIXME now done through HTML _initialize_output_state, would need
to readd when the HTML function is overriden
diff --git a/tp/Texinfo/XS/main/converter_types.h
b/tp/Texinfo/XS/main/converter_types.h
index d8762f391d..4b18fb524d 100644
--- a/tp/Texinfo/XS/main/converter_types.h
+++ b/tp/Texinfo/XS/main/converter_types.h
@@ -696,11 +696,12 @@ typedef struct CONVERTER {
output_unit_files with changed counter */
HTML_ADDED_TARGET_LIST added_targets; /* targets added */
STRING_LIST shared_conversion_state_integer; /* modified */
- /* next three allow to switch from normal HTML formatting to css strings
+ /* next 4 allow to switch from normal HTML formatting to css strings
formatting */
FORMATTING_REFERENCE *current_formatting_references;
TYPE_CONVERSION_FUNCTION *current_types_conversion_function;
COMMAND_CONVERSION_FUNCTION *current_commands_conversion_function;
+ void (* current_format_protect_text) (const char *text, TEXT *result);
/* state common with perl converter */
int document_global_context;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/convert_html.c (format_protect_text) (html_convert_css_string, html_initialize_output_state), tp/Texinfo/XS/main/converter_types.h (CONVERTER): add current_format_protect_text function reference in converter to switch from html to css formatting in C in format_protect_text.,
Patrice Dumas <=