[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Plaintext.pm (new_formatter)
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Do not set 'indent_level' on config structure passed to paragraph formatter, as it is not used. (_convert): Do not call new_formatter with 'indent_level' in the conf, setting 'indent_length' instead. |
Date: |
Sun, 26 Nov 2023 13:37:01 -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 c0ef695fbc * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Do not
set 'indent_level' on config structure passed to paragraph formatter, as it is
not used. (_convert): Do not call new_formatter with 'indent_level' in the
conf, setting 'indent_length' instead.
c0ef695fbc is described below
commit c0ef695fbc5f04b3f4e0dff8a98fad9b85a8e4d9
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Nov 26 18:36:39 2023 +0000
* tp/Texinfo/Convert/Plaintext.pm (new_formatter):
Do not set 'indent_level' on config structure passed to paragraph
formatter, as it is not used.
(_convert): Do not call new_formatter with 'indent_level' in the
conf, setting 'indent_length' instead.
---
ChangeLog | 8 ++++++++
tp/Texinfo/Convert/Plaintext.pm | 18 ++++++++++--------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd3e0eed20..f940ed3546 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-11-26 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/Convert/Plaintext.pm (new_formatter):
+ Do not set 'indent_level' on config structure passed to paragraph
+ formatter, as it is not used.
+ (_convert): Do not call new_formatter with 'indent_level' in the
+ conf, setting 'indent_length' instead.
+
2023-11-26 Gavin Smith <gavinsmith0123@gmail.com>
new_formatter tweaks
diff --git a/tp/Texinfo/Convert/Plaintext.pm b/tp/Texinfo/Convert/Plaintext.pm
index 7ba414953c..19f97a6b0d 100644
--- a/tp/Texinfo/Convert/Plaintext.pm
+++ b/tp/Texinfo/Convert/Plaintext.pm
@@ -676,7 +676,6 @@ sub new_formatter($$;$)
my $container_conf = {
'max' => $self->{'text_element_context'}->[-1]->{'max'},
- 'indent_level' => $self->{'format_context'}->[-1]->{'indent_level'},
};
$container_conf->{'indent_length'}
@@ -701,7 +700,7 @@ sub new_formatter($$;$)
}
my $indent = $container_conf->{'indent_length'};
- $indent = $indent_length*$container_conf->{'indent_level'}
+ $indent = $indent_length*($self->{'format_context'}->[-1]->{'indent_level'})
if (!defined($indent));
if ($first_indent_length) {
@@ -2849,8 +2848,9 @@ sub _convert($$)
$table_item_tree->{'type'} = 'frenchspacing';
$result = $self->convert_line($table_item_tree,
- {'indent_level'
- => $self->{'format_context'}->[-1]->{'indent_level'}
-1});
+ {'indent_length' =>
+ ($self->{'format_context'}->[-1]->{'indent_level'} -1)
+ * $indent_length});
if ($result ne '') {
$result = $self->ensure_end_of_line($result);
$self->{'empty_lines_count'} = 0;
@@ -2936,12 +2936,14 @@ sub _convert($$)
and $element->{'args'}->[0]->{'contents'}) {
if
($self->{'preformatted_context_commands'}->{$self->{'context'}->[-1]}) {
$result = $self->_convert_unfilled($element->{'args'}->[0],
- {'indent_level'
- => $self->{'format_context'}->[-1]->{'indent_level'} -1});
+ {'indent_length' =>
+ ($self->{'format_context'}->[-1]->{'indent_level'} -1)
+ * $indent_length});
} else {
$result = $self->convert_line($element->{'args'}->[0],
- {'indent_level'
- => $self->{'format_context'}->[-1]->{'indent_level'} -1});
+ {'indent_length' =>
+ ($self->{'format_context'}->[-1]->{'indent_level'} -1)
+ * $indent_length});
}
}
if ($result ne '') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Plaintext.pm (new_formatter): Do not set 'indent_level' on config structure passed to paragraph formatter, as it is not used. (_convert): Do not call new_formatter with 'indent_level' in the conf, setting 'indent_length' instead.,
Gavin D. Smith <=