[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sat, 8 Oct 2022 14:43:06 -0400 (EDT) |
branch: master
commit ddc686e64f64f7f487e2c08db7b7d445b6822b89
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 8 20:40:24 2022 +0200
* Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
(_texinfo_handle_element_end): set explanation to the third argument
of @ref and not the second such that it is used for all the output
formats.
---
ChangeLog | 7 +++++++
Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm | 9 +++++++--
Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t | 8 ++++----
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3f92cb82ef..3e2c4a661f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-10-08 Patrice Dumas <pertusus@free.fr>
+
+ * Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
+ (_texinfo_handle_element_end): set explanation to the third argument
+ of @ref and not the second such that it is used for all the output
+ formats.
+
2022-10-08 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/Convert/LaTeX.pm (_latex_header) <indices>:
diff --git a/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
b/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
index 327b797ae6..e355350957 100644
--- a/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
+++ b/Pod-Simple-Texinfo/lib/Pod/Simple/Texinfo.pm
@@ -25,6 +25,11 @@
# Pod::Simple::SimpleTree subclass, using _convert_pod_simple_tree.
# We prefer a Pod::Simple::PullParser subclassing to be able to use
# get_short_title().
+#
+#
+# TODO: it could be relevant to convert L<...> referring to external modules to
+# urls to Metacpan, or similar websites, using @url instead of @ref, which
+# is very unlikely to lead to other modules documentation.
package Pod::Simple::Texinfo;
@@ -892,10 +897,10 @@ sub _texinfo_handle_element_end($$$)
if (defined($texinfo_manual)) {
$explanation = '' if (!defined($explanation));
_output($fh, $self->{'texinfo_accumulated'},
- "\@ref{$texinfo_node,$explanation,, $texinfo_manual}");
+ "\@ref{$texinfo_node,,$explanation, $texinfo_manual}");
} elsif (defined($explanation)) {
_output($fh, $self->{'texinfo_accumulated'},
- "\@ref{$texinfo_node,$explanation,$explanation}");
+ "\@ref{$texinfo_node,,$explanation}");
} else {
if (defined($texinfo_section)
and $texinfo_section ne $texinfo_node) {
diff --git a/Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t
b/Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t
index 6281707a51..790a8dc3b0 100644
--- a/Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t
+++ b/Pod-Simple-Texinfo/t/Pod-Simple-Texinfo.t
@@ -198,10 +198,10 @@ run_test('=over
=back
', '@table @asis
-@item a @ref{, pod2text,, pod2text}
+@item a @ref{,, pod2text, pod2text}
@anchor{a pod2text}
-@item a @ref{, pod2latex,, pod2latex}
+@item a @ref{,, pod2latex, pod2latex}
@anchor{a pod2latex}
@end table
@@ -374,9 +374,9 @@ L<F<--->|F<-->/C<--->>
','@chapter @asis{}-@asis{}-@asis{}-@asis{}- @asis{}-@asis{}-@asis{} @code{---}
@anchor{@asis{}-@asis{}-@asis{}-@asis{}- @asis{}-@asis{}-@asis{} @code{---}}
-@code{--- @ref{---, @asis{}-@asis{}-@asis{}-@asis{},, --}}
+@code{--- @ref{---,, @asis{}-@asis{}-@asis{}-@asis{}, --}}
-@ref{@code{---}, @file{---},, --}
+@ref{@code{---},, @file{---}, --}
', 'protected -');