mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
podwrapper: Remove =encoding from input files and add it back in podwrapper.
This changes podwrapper so that the input (POD) files should not contain an =encoding directive. However they must be UTF-8. Podwrapper then adds the '=encoding utf8' directive back during final generation. This in particular avoids problems with nested =encoding directives in fragments. These break POD, and are undesirable anyway.
This commit is contained in:
@@ -31,8 +31,6 @@ use File::Basename;
|
||||
# https://www.redhat.com/archives/libguestfs/2013-May/thread.html#00088
|
||||
eval { $Text::Wrap::huge = "overflow" };
|
||||
|
||||
=encoding utf8
|
||||
|
||||
=head1 NAME
|
||||
|
||||
podwrapper.pl - Generate libguestfs documentation from POD input files
|
||||
@@ -291,6 +289,12 @@ foreach (@verbatims) {
|
||||
if $content eq $oldcontent;
|
||||
}
|
||||
|
||||
# There should be no =encoding line present in the content (we will add one).
|
||||
die "$progname: $input: =encoding must not be present in input\n"
|
||||
if $content =~ /^=encoding/m;
|
||||
|
||||
$content = "=encoding utf8\n\n$content";
|
||||
|
||||
if ($strict_checks) {
|
||||
# Verify sections present / not present.
|
||||
die "$progname: $input: missing AUTHOR or AUTHORS section\n"
|
||||
|
||||
Reference in New Issue
Block a user