texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/Plaintext.pm (_convert_unfil


From: Gavin D. Smith
Subject: branch master updated: * tp/Texinfo/Convert/Plaintext.pm (_convert_unfilled): Inline into the only call site, and remove function.
Date: Wed, 29 Nov 2023 15:38:43 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new b5e1fc597f * tp/Texinfo/Convert/Plaintext.pm (_convert_unfilled): 
Inline into the only call site, and remove function.
b5e1fc597f is described below

commit b5e1fc597f5e7a96f27a7066f50d822cdd3ee10a
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Nov 29 20:38:33 2023 +0000

    * tp/Texinfo/Convert/Plaintext.pm (_convert_unfilled):
    Inline into the only call site, and remove function.
---
 ChangeLog                       |  5 +++++
 tp/Texinfo/Convert/Plaintext.pm | 27 ++++++++++-----------------
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e5d8b7676d..3d18c92c9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-11-29  Gavin Smith <gavinsmith0123@gmail.com>
+
+       * tp/Texinfo/Convert/Plaintext.pm (_convert_unfilled):
+       Inline into the only call site, and remove function.
+
 2023-11-28  Patrice Dumas  <pertusus@free.fr>
 
        * doc/texi2any_api.texi (Customizing Footnotes),
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 9fd958398b..96aaba868f 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -792,19 +792,6 @@ sub convert_line($$;$)
   return $text;
 }
 
-sub _convert_unfilled($$;$)
-{
-  my ($self, $converted, $conf) = @_;
-  my $formatter = $self->new_formatter('unfilled', $conf);
-  $formatter->{'font_type_stack'}->[-1]->{'monospace'} = 1;
-  push @{$self->{'formatters'}}, $formatter;
-  my $result = $self->_convert($converted);
-  $result .= _count_added($self, $formatter->{'container'},
-                Texinfo::Convert::Paragraph::end($formatter->{'container'}));
-  pop @{$self->{'formatters'}};
-  return $result;
-}
-
 sub count_bytes($$)
 {
   my ($self, $string) = @_;
@@ -2922,10 +2909,16 @@ sub _convert($$)
       if ($element->{'args'}->[0]
           and $element->{'args'}->[0]->{'contents'}) {
         if 
($self->{'preformatted_context_commands'}->{$self->{'context'}->[-1]}) {
-          $result = $self->_convert_unfilled($element->{'args'}->[0],
-               {'indent_length' =>
-                   ($self->{'format_context'}->[-1]->{'indent_level'} -1)
-                     * $indent_length});
+          my $formatter = $self->new_formatter('unfilled',
+            {'indent_length' =>
+                ($self->{'format_context'}->[-1]->{'indent_level'} -1)
+                  * $indent_length});
+          $formatter->{'font_type_stack'}->[-1]->{'monospace'} = 1;
+          push @{$self->{'formatters'}}, $formatter;
+          $result = $self->_convert($element->{'args'}->[0]);
+          $result .= _count_added($self, $formatter->{'container'},
+              Texinfo::Convert::Paragraph::end($formatter->{'container'}));
+          pop @{$self->{'formatters'}};
         } else {
           $result = $self->convert_line($element->{'args'}->[0],
              {'indent_length' =>



reply via email to

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