[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * doc/texi2any_api.texi (Simple Customization of
From: |
Patrice Dumas |
Subject: |
branch master updated: * doc/texi2any_api.texi (Simple Customization of CSS), tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (css_get_selector_style), tp/Texinfo/XS/convert/ConvertXS.xs (html_css_get_selector_style), tp/Texinfo/XS/convert/convert_html.c (html_css_get_selector_style): rename *css_selector_style functions as *css_get_selector_style. |
Date: |
Sat, 06 Jan 2024 12:30:07 -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 ddf9261f9c * doc/texi2any_api.texi (Simple Customization of CSS),
tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (css_get_selector_style),
tp/Texinfo/XS/convert/ConvertXS.xs (html_css_get_selector_style),
tp/Texinfo/XS/convert/convert_html.c (html_css_get_selector_style): rename
*css_selector_style functions as *css_get_selector_style.
ddf9261f9c is described below
commit ddf9261f9c23f13e8d62f7b6cd4ae54f439378b5
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Jan 6 18:30:07 2024 +0100
* doc/texi2any_api.texi (Simple Customization of CSS),
tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides)
(css_get_selector_style), tp/Texinfo/XS/convert/ConvertXS.xs
(html_css_get_selector_style), tp/Texinfo/XS/convert/convert_html.c
(html_css_get_selector_style): rename *css_selector_style functions as
*css_get_selector_style.
---
ChangeLog | 9 +++++++++
doc/texi2any_api.texi | 8 ++++----
tp/Texinfo/Convert/HTML.pm | 10 +++++-----
tp/Texinfo/XS/convert/ConvertXS.xs | 6 +++---
tp/Texinfo/XS/convert/convert_html.c | 2 +-
tp/Texinfo/XS/convert/convert_html.h | 2 +-
tp/init/documentation_examples.pm | 4 ++--
7 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0226201833..e73669fbfb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-01-06 Patrice Dumas <pertusus@free.fr>
+
+ * doc/texi2any_api.texi (Simple Customization of CSS),
+ tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides)
+ (css_get_selector_style), tp/Texinfo/XS/convert/ConvertXS.xs
+ (html_css_get_selector_style), tp/Texinfo/XS/convert/convert_html.c
+ (html_css_get_selector_style): rename *css_selector_style functions as
+ *css_get_selector_style.
+
2024-01-06 Patrice Dumas <pertusus@free.fr>
* tp/t/18itemize.t (enumerate_argument, enumerate_argument_item):
diff --git a/doc/texi2any_api.texi b/doc/texi2any_api.texi
index db2b3acf45..6e1c77677e 100644
--- a/doc/texi2any_api.texi
+++ b/doc/texi2any_api.texi
@@ -707,12 +707,12 @@ rules selectors are, classically,
@code{@var{element}.@var{class}} strings with
@var{element} an HTML element and @var{class} an attribute class associated to
that element.
-The function used are @code{css_get_info} and @code{css_selector_style}
+The function used are @code{css_get_info} and @code{css_get_selector_style}
to get information and @code{css_add_info} and @code{css_set_selector_style}
to modify:
@defun @var{$converter}->css_get_info ($specification)
-@defunx @var{$converter}->css_selector_style ($selector)
+@defunx @var{$converter}->css_get_selector_style ($selector)
@defunx @var{$converter}->css_add_info ($specification, $css_info)
@defunx @var{$converter}->css_set_selector_style ($selector, $css_style)
@@ -726,7 +726,7 @@ class attributes selectors, and can be used to get the list
of selectors.
With @code{css_get_info}, array references corresponding to
@var{$specification}
are returned.
-@code{css_selector_style} returns the CSS style corresponding to the HTML
+@code{css_get_selector_style} returns the CSS style corresponding to the HTML
element and class attribute selector @var{$selector}, or @code{undef} if not
found.
@@ -743,7 +743,7 @@ Some examples of use:
@example
my @@all_included_rules = $converter->css_get_info('rules');
my $all_default_selector_styles = $converter->css_get_info('styles');
-my $titlefont_header_style = $converter->css_selector_style('h1.titlefont');
+my $titlefont_header_style =
$converter->css_get_selector_style('h1.titlefont');
$converter->css_set_selector_style('h1.titlefont', 'text-align:center');
$converter->css_add_info('imports', "\@@import \"special.css\";\n");
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 8da7972ac6..cf55c89092 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -237,8 +237,8 @@ my %XS_conversion_overrides = (
=> "Texinfo::Convert::ConvertXS::html_css_set_selector_style",
"Texinfo::Convert::HTML::css_get_info"
=> "Texinfo::Convert::ConvertXS::html_css_get_info",
- "Texinfo::Convert::HTML::css_selector_style",
- => "Texinfo::Convert::ConvertXS::html_css_selector_style",
+ "Texinfo::Convert::HTML::css_get_selector_style",
+ => "Texinfo::Convert::ConvertXS::html_css_get_selector_style",
"Texinfo::Convert::HTML::register_footnote",
=> "Texinfo::Convert::ConvertXS::html_register_footnote",
"Texinfo::Convert::HTML::get_pending_footnotes",
@@ -604,7 +604,7 @@ sub css_get_info($$) {
}
}
-sub css_selector_style($$)
+sub css_get_selector_style($$)
{
my $self = shift;
my $css_info = shift;
@@ -5651,7 +5651,7 @@ sub _convert_itemize_command($$$$$)
}
if (defined($mark_class_name)
- and defined($self->css_selector_style('ul.mark-'.$mark_class_name))) {
+ and defined($self->css_get_selector_style('ul.mark-'.$mark_class_name)))
{
return $self->html_attribute_class('ul', [$cmdname,
'mark-'.$mark_class_name])
.">\n" . $content. "</ul>\n";
@@ -9122,7 +9122,7 @@ sub _default_format_css_lines($;$)
$css_text .= join('', @$css_import_lines) . "\n"
if (@$css_import_lines);
foreach my $element_class (@$css_element_classes) {
- my $css_style = $self->css_selector_style($element_class);
+ my $css_style = $self->css_get_selector_style($element_class);
$css_text .= "$element_class {$css_style}\n"
if defined($css_style);
}
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs
b/tp/Texinfo/XS/convert/ConvertXS.xs
index c4cf71ad80..b0b59660d2 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -1379,17 +1379,17 @@ html_css_get_info (SV *converter_in, char *spec)
RETVAL
SV *
-html_css_selector_style (SV *converter_in, css_info)
+html_css_get_selector_style (SV *converter_in, css_info)
char *css_info = (char *)SvPVutf8_nolen($arg);
PREINIT:
CONVERTER *self;
const char *css_style = 0;
CODE:
self = get_sv_converter (converter_in,
- "html_css_selector_style");
+ "html_css_get_selector_style");
if (self)
{
- css_style = html_css_selector_style (self, css_info);
+ css_style = html_css_get_selector_style (self, css_info);
}
if (css_style)
RETVAL = newSVpv_utf8 (css_style, 0);
diff --git a/tp/Texinfo/XS/convert/convert_html.c
b/tp/Texinfo/XS/convert/convert_html.c
index 5533aa11f3..6f3b91acf8 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -4260,7 +4260,7 @@ html_css_set_selector_style (CONVERTER* self, const char
*css_info,
}
const char *
-html_css_selector_style (CONVERTER* self, const char *css_info)
+html_css_get_selector_style (CONVERTER* self, const char *css_info)
{
CSS_SELECTOR_STYLE *selector_style
= find_css_selector_style (&self->css_element_class_styles, css_info);
diff --git a/tp/Texinfo/XS/convert/convert_html.h
b/tp/Texinfo/XS/convert/convert_html.h
index e57bad2743..b86832d745 100644
--- a/tp/Texinfo/XS/convert/convert_html.h
+++ b/tp/Texinfo/XS/convert/convert_html.h
@@ -142,7 +142,7 @@ void html_css_add_info (CONVERTER *self, enum css_info_type
type,
STRING_LIST *html_css_get_info (CONVERTER *self, enum css_info_type type);
void html_css_set_selector_style (CONVERTER* self, const char *css_info,
const char *css_style);
-const char *html_css_selector_style (CONVERTER* self, const char *css_info);
+const char *html_css_get_selector_style (CONVERTER* self, const char
*css_info);
void html_register_footnote (CONVERTER *self, const ELEMENT *command,
const char *footid, const char *docid, const int number_in_doc,
diff --git a/tp/init/documentation_examples.pm
b/tp/init/documentation_examples.pm
index cc34e108dd..1ba1e0a335 100644
--- a/tp/init/documentation_examples.pm
+++ b/tp/init/documentation_examples.pm
@@ -56,10 +56,10 @@ sub my_function_set_some_css {
my $converter = shift;
my $all_included_rules = $converter->css_get_info('rules');
my $all_default_selectors = $converter->css_get_info('styles');
- my $titlefont_style = $converter->css_selector_style('h1.titlefont');
+ my $titlefont_style = $converter->css_get_selector_style('h1.titlefont');
$titlefont_style = 'undefined' if (!defined($titlefont_style));
$shown_styles = $titlefont_style.' '.
- $converter->css_selector_style('h1.shorttitlepage');
+ $converter->css_get_selector_style('h1.shorttitlepage');
$converter->css_set_selector_style('h1.titlefont', 'text-align:center');
my $footnotestyle_before_setting = $converter->get_conf('footnotestyle');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * doc/texi2any_api.texi (Simple Customization of CSS), tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides) (css_get_selector_style), tp/Texinfo/XS/convert/ConvertXS.xs (html_css_get_selector_style), tp/Texinfo/XS/convert/convert_html.c (html_css_get_selector_style): rename *css_selector_style functions as *css_get_selector_style.,
Patrice Dumas <=
- Prev by Date:
[no subject]
- Next by Date:
branch master updated: * tp/Makefile.am (test_files), tp/t/init/test_css_info_functions.pm, tp/Makefile.tres, tp/t/html_tests.t (base_for_css_info_in_init_test) (text_css_info_in_init): add text_css_info_in_init, a test of css_add_info and css_set_selector_style use, and a test without the init file used, base_for_css_info_in_init_test, for comparison.
- Previous by thread:
master updated (e67c61e7a5 -> 0559c251dd)
- Next by thread:
branch master updated: * tp/Makefile.am (test_files), tp/t/init/test_css_info_functions.pm, tp/Makefile.tres, tp/t/html_tests.t (base_for_css_info_in_init_test) (text_css_info_in_init): add text_css_info_in_init, a test of css_add_info and css_set_selector_style use, and a test without the init file used, base_for_css_info_in_init_test, for comparison.
- Index(es):