[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Config.pm (texinfo_register_style_co
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Config.pm (texinfo_register_style_command_formatting), tp/Texinfo/Convert/HTML.pm (%style_commands_formatting) (_convert_style_command): rename 'attribute' key as 'element' as it is the element name before (potentially) holding attributes. |
Date: |
Sun, 30 Jan 2022 10:19:33 -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 281f007efc * tp/Texinfo/Config.pm
(texinfo_register_style_command_formatting), tp/Texinfo/Convert/HTML.pm
(%style_commands_formatting) (_convert_style_command): rename 'attribute' key
as 'element' as it is the element name before (potentially) holding attributes.
281f007efc is described below
commit 281f007efc8e3f8f0be05767ff31560aa0f0f0d6
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jan 30 16:19:23 2022 +0100
* tp/Texinfo/Config.pm (texinfo_register_style_command_formatting),
tp/Texinfo/Convert/HTML.pm (%style_commands_formatting)
(_convert_style_command): rename 'attribute' key as 'element'
as it is the element name before (potentially) holding attributes.
---
ChangeLog | 7 +++++++
tp/Texinfo/Config.pm | 2 +-
tp/Texinfo/Convert/HTML.pm | 14 +++++++-------
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c2007ff4ba..ede0485abc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-01-30 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Config.pm (texinfo_register_style_command_formatting),
+ tp/Texinfo/Convert/HTML.pm (%style_commands_formatting)
+ (_convert_style_command): rename 'attribute' key as 'element'
+ as it is the element name before (potentially) holding attributes.
+
2022-01-30 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Config.pm (texinfo_register_style_command_formatting),
diff --git a/tp/Texinfo/Config.pm b/tp/Texinfo/Config.pm
index 3aeab3b501..a8749ca546 100644
--- a/tp/Texinfo/Config.pm
+++ b/tp/Texinfo/Config.pm
@@ -490,7 +490,7 @@ sub texinfo_register_style_command_formatting($$;$$)
$specification->{'quotes'} = $in_quotes;
}
if (defined($html_element)) {
- $specification->{'attribute'} = $html_element;
+ $specification->{'element'} = $html_element;
}
$GNUT_style_commands_formatting_info->{$context}->{$command} =
$specification;
return 1;
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index f5d0d53885..f457cb527e 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -2441,13 +2441,13 @@ my @all_style_commands = keys %{{ map { $_ => 1 }
foreach my $command(@all_style_commands) {
# default is no attribute.
if ($style_commands_element{'normal'}->{$command}) {
- $style_commands_formatting{'normal'}->{$command}->{'attribute'}
+ $style_commands_formatting{'normal'}->{$command}->{'element'}
= $style_commands_element{'normal'}->{$command};
- $style_commands_formatting{'preformatted'}->{$command}->{'attribute'}
+ $style_commands_formatting{'preformatted'}->{$command}->{'element'}
= $style_commands_element{'normal'}->{$command};
}
if ($style_commands_element{'preformatted'}->{$command}) {
- $style_commands_formatting{'preformatted'}->{$command}->{'attribute'} =
+ $style_commands_formatting{'preformatted'}->{$command}->{'element'} =
$style_commands_element{'preformatted'}->{$command};
}
if ($quoted_style_commands{$command}) {
@@ -2458,7 +2458,7 @@ foreach my $command(@all_style_commands) {
$default_commands_conversion{$command} = \&_convert_style_command;
}
-$style_commands_formatting{'preformatted'}->{'sc'}->{'attribute'} = 'span';
+$style_commands_formatting{'preformatted'}->{'sc'}->{'element'} = 'span';
# currently unused, could be re-used if there is a need to have attributes
# specified in %style_commands_element
@@ -2509,16 +2509,16 @@ sub _convert_style_command($$$$)
if (defined($attribute_hash->{$cmdname})) {
my $attribute_text = '';
my $style;
- if (defined($attribute_hash->{$cmdname}->{'attribute'})) {
+ if (defined($attribute_hash->{$cmdname}->{'element'})) {
# the commented out code is useful only if there are attributes in
# style_commands_element
#my $class;
#($style, $class, $attribute_text)
- # = _parse_attribute($attribute_hash->{$cmdname}->{'attribute'});
+ # = _parse_attribute($attribute_hash->{$cmdname}->{'element'});
#if (defined($class) and $class ne '') {
# push @classes, $class;
#}
- my $style = $attribute_hash->{$cmdname}->{'attribute'};
+ my $style = $attribute_hash->{$cmdname}->{'element'};
my $open = $self->html_attribute_class($style, \@classes);
if ($open ne '') {
$text = $open . '>' . $text . "</$style>";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Config.pm (texinfo_register_style_command_formatting), tp/Texinfo/Convert/HTML.pm (%style_commands_formatting) (_convert_style_command): rename 'attribute' key as 'element' as it is the element name before (potentially) holding attributes.,
Patrice Dumas <=