texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_style_comm


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (_convert_style_command): comment out the code parsing attributes in style command specification as there is no need to specify attributes right now.
Date: Wed, 12 Jan 2022 06:45:18 -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 ddb7621212 * tp/Texinfo/Convert/HTML.pm (_convert_style_command): 
comment out the code parsing attributes in style command specification as there 
is no need to specify attributes right now.
ddb7621212 is described below

commit ddb762121294e1359f8ae6a1c2b3985f8f1ece17
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Jan 12 12:45:08 2022 +0100

    * tp/Texinfo/Convert/HTML.pm (_convert_style_command): comment
    out the code parsing attributes in style command specification
    as there is no need to specify attributes right now.
---
 ChangeLog                  |  6 ++++++
 tp/Texinfo/Convert/HTML.pm | 24 +++++++++++++++---------
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5fde6a8f29..0730c501f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-01-11  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (_convert_style_command): comment
+       out the code parsing attributes in style command specification
+       as there is no need to specify attributes right now.
+
 2022-01-11  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (html_attribute_class)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 01da23e608..3f682f22a4 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -2179,6 +2179,8 @@ foreach my $command(@all_style_commands) {
 
 $style_commands_formatting{'preformatted'}->{'sc'}->{'attribute'} = 'span';
 
+# currently unused, could be re-used if there is a need to have attributes
+# specified in %style_commands_element
 sub _parse_attribute($)
 {
   my $element = shift;
@@ -2226,17 +2228,21 @@ sub _convert_style_command($$$$)
     my $attribute_text = '';
     my $style;
     if (defined($attribute_hash->{$cmdname}->{'attribute'})) {
-      my $class;
-      ($style, $class, $attribute_text)
-        = _parse_attribute ($attribute_hash->{$cmdname}->{'attribute'});
-      if (defined($class) and $class ne '') {
-        push @additional_classes, $class;
-      }
+      # 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'});
+      #if (defined($class) and $class ne '') {
+      #  push @additional_classes, $class;
+      #}
+      my $style = $attribute_hash->{$cmdname}->{'attribute'};
       my $open = $self->html_attribute_class($style, $cmdname, 
\@additional_classes);
       if ($open ne '') {
-        $text = $open . "$attribute_text>" . $text . "</$style>";
-      } elsif ($attribute_text ne '') {
-        $text = "<$style $attribute_text>". $text . "</$style>";
+        $text = $open . '>' . $text . "</$style>";
+      #  $text = $open . "$attribute_text>" . $text . "</$style>";
+      #} elsif ($attribute_text ne '') {
+      #  $text = "<$style $attribute_text>". $text . "</$style>";
       }
     }
     if (defined($attribute_hash->{$cmdname}->{'quote'})) {



reply via email to

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