[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Info.pm (_info_header) move
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Info.pm (_info_header) move _set_global_multiple_commands() call closer to the line where they are used and add a comment. |
Date: |
Thu, 02 Sep 2021 17:19:51 -0400 |
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 77ccc44 * tp/Texinfo/Convert/Info.pm (_info_header) move
_set_global_multiple_commands() call closer to the line where they are used and
add a comment.
77ccc44 is described below
commit 77ccc4404279d57b30a4203f488df83a7d2601da
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Sep 2 23:18:43 2021 +0200
* tp/Texinfo/Convert/Info.pm (_info_header) move
_set_global_multiple_commands() call closer to the line
where they are used and add a comment.
---
tp/Texinfo/Convert/Info.pm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tp/Texinfo/Convert/Info.pm b/tp/Texinfo/Convert/Info.pm
index 0340a63..882596b 100644
--- a/tp/Texinfo/Convert/Info.pm
+++ b/tp/Texinfo/Convert/Info.pm
@@ -318,7 +318,6 @@ sub _info_header($)
{
my $self = shift;
- $self->_set_global_multiple_commands(1);
my $paragraph = Texinfo::Convert::Paragraph->new();
my $result = add_text($paragraph, "This is ");
# This ensures that spaces in file are kept.
@@ -336,6 +335,11 @@ sub _info_header($)
$result .= "\n";
$self->{'empty_lines_count'} = 1;
+ # format @copying using the first value set for global
+ # commands in the document. It may not correspond to the
+ # intent of the author if the global commands appears late
+ # in the document. However this is the best guess we can do.
+ $self->_set_global_multiple_commands(1);
if ($self->{'extra'} and $self->{'extra'}->{'copying'}) {
print STDERR "COPYING HEADER\n" if ($self->get_conf('DEBUG'));
$self->{'in_copying_header'} = 1;
@@ -345,6 +349,8 @@ sub _info_header($)
$result .= $self->_footnotes();
delete $self->{'in_copying_header'};
}
+ $self->_set_global_multiple_commands(0);
+
if ($self->{'parser_info'}->{'dircategory_direntry'}) {
$self->{'ignored_commands'}->{'direntry'} = 0;
foreach my $command (@{$self->{'parser_info'}->{'dircategory_direntry'}}) {
@@ -366,7 +372,6 @@ sub _info_header($)
}
$self->{'ignored_commands'}->{'direntry'} = 1;
}
- $self->_set_global_multiple_commands(0);
return $result;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Info.pm (_info_header) move _set_global_multiple_commands() call closer to the line where they are used and add a comment.,
Patrice Dumas <=