[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: tp/Texinfo/Structuring.pm (new_block_command): re
From: |
Patrice Dumas |
Subject: |
branch master updated: tp/Texinfo/Structuring.pm (new_block_command): rearrange code |
Date: |
Wed, 07 Sep 2022 17:43:45 -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 6f37b3278a tp/Texinfo/Structuring.pm (new_block_command): rearrange
code
6f37b3278a is described below
commit 6f37b3278a6840b583bec0b5f9285dcd9f755f7c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Wed Sep 7 23:43:01 2022 +0200
tp/Texinfo/Structuring.pm (new_block_command): rearrange code
---
tp/Texinfo/Structuring.pm | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 74745fefb2..423b839a7c 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1512,23 +1512,24 @@ sub new_block_command($$$)
my $parent = shift;
my $command_name = shift;
- my $end = {'cmdname' => 'end', 'extra' =>
- {'spaces_before_argument' => ' ',
- 'text_arg' => $command_name}};
- push @{$end->{'args'}},
- {'type' => 'line_arg', 'parent' => $end,
- 'extra' => {'spaces_after_argument' => "\n"}};
- push @{$end->{'args'}->[0]->{'contents'}},
- {'text' => $command_name, 'parent' => $end->{'args'}->[0]};
my $new_block = {'cmdname' => $command_name, 'parent' => $parent};
- my $block_line_arg = {'type' => 'block_line_arg',
- 'parent' => $new_block,
- 'extra' => { 'spaces_after_argument' => "\n",}};
- $new_block->{'args'} = [$block_line_arg];
- $new_block->{'contents'} = [@$block_contents, $end];
- foreach my $content (@{$new_block->{'contents'}}) {
+ $new_block->{'args'} = [{'type' => 'block_line_arg', 'parent' => $new_block,
+ 'extra' => { 'spaces_after_argument' => "\n",}}];
+
+ foreach my $content (@$block_contents) {
$content->{'parent'} = $new_block;
}
+
+ my $end = {'cmdname' => 'end', 'parent' => $new_block,
+ 'extra' => {'spaces_before_argument' => ' ',
+ 'text_arg' => $command_name}};
+ $end->{'args'} = [{'type' => 'line_arg', 'parent' => $end,
+ 'extra' => {'spaces_after_argument' => "\n"}}];
+ push @{$end->{'args'}->[0]->{'contents'}},
+ {'text' => $command_name, 'parent' => $end->{'args'}->[0]};
+
+ $new_block->{'contents'} = [@$block_contents, $end];
+
return $new_block;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: tp/Texinfo/Structuring.pm (new_block_command): rearrange code,
Patrice Dumas <=