[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Convert/Text.pm (_convert): revert a
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Convert/Text.pm (_convert): revert a change on explained_commands conversion, if the number of args is >= 2, handle them especially. |
Date: |
Sun, 29 Sep 2024 09:43:10 -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 daaf44545e * tp/Texinfo/Convert/Text.pm (_convert): revert a change on
explained_commands conversion, if the number of args is >= 2, handle them
especially.
daaf44545e is described below
commit daaf44545e66026a97847b7d3a029bd4d8ee847e
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jul 1 16:15:29 2024 +0200
* tp/Texinfo/Convert/Text.pm (_convert): revert a change on
explained_commands conversion, if the number of args is >= 2, handle
them especially.
---
ChangeLog | 6 ++++++
tp/Texinfo/Convert/Text.pm | 17 ++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a312b486eb..b9a0dbcb28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-01 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Convert/Text.pm (_convert): revert a change on
+ explained_commands conversion, if the number of args is >= 2, handle
+ them especially.
+
2024-07-01 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/Text.pm (_convert),
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index 81828a9168..27f3ba5955 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -612,16 +612,15 @@ sub _convert($$)
} else {
return '';
}
- } elsif ($Texinfo::Commands::explained_commands{$element->{'cmdname'}}) {
- if ($element->{'args'} and $element->{'args'}->[1]) {
- my $explanation = _convert($options, $element->{'args'}->[1]);
- if ($explanation ne '') {
- return _convert($options, $element->{'args'}->[0]) ."
($explanation)";
- } else {
- return _convert($options, $element->{'args'}->[0]);
- }
+ # if there is only one argument, it is processed below with the other
+ # brace commands
+ } elsif ($Texinfo::Commands::explained_commands{$element->{'cmdname'}}
+ and $element->{'args'} and scalar(@{$element->{'args'}}) >= 2) {
+ my $explanation = _convert($options, $element->{'args'}->[1]);
+ if ($explanation ne '') {
+ return _convert($options, $element->{'args'}->[0]) ." ($explanation)";
} else {
- return '';
+ return _convert($options, $element->{'args'}->[0]);
}
} elsif ($Texinfo::Commands::brace_commands{$element->{'cmdname'}}
and $Texinfo::Commands::brace_commands{$element->{'cmdname'}} eq
'inline') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Convert/Text.pm (_convert): revert a change on explained_commands conversion, if the number of args is >= 2, handle them especially.,
Patrice Dumas <=