mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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.
This commit is contained 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;
|
||||
|
||||
Reference in New Issue
Block a user