[Pkg-libvirt-commits] [libguestfs] 02/36: podwrapper: simplify external references pointing to self
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:13:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.29.47
in repository libguestfs.
commit d8f1962bd20068abef0f23c48f90e2f36e628af7
Author: Pino Toscano <ptoscano at redhat.com>
Date: Tue Jun 9 10:54:13 2015 +0200
podwrapper: simplify external references pointing to self
When convering a POD documentation, possibily combining various
sub-documents together, simplify the L<> links that explicitly point to
the very same documentation being generated.
For example, when generating the virt-builder documentation, links like
L<virt-builder(1)/SECTION>
will be turned into
L</SECTION>
thus not making Pod::Simple parse them as external reference.
While it is a slightly crude hack, it seems there's no easy way to
process the link parsing with Pod::Simple subclasses.
---
podwrapper.pl.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index 0bb7b28..b354db6 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -278,6 +278,9 @@ foreach (@inserts) {
if $content eq $oldcontent;
}
+# Turn external links to this man page into simple cross-section links.
+$content =~ s,\QL<$name($section)/\E,L</,g;
+
# Perform @verbatims.
foreach (@verbatims) {
my @a = split /:/, $_, 2;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list