summaryrefslogtreecommitdiffstats
path: root/util/perl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-12-13 11:54:55 +0100
committerRichard Levitte <levitte@openssl.org>2019-12-21 22:53:54 +0100
commit8b849cca31335ae23462beeefe8909b42b168983 (patch)
treecc11cbc82c76ef8a4a7f26c0551d5bd7312ee5c7 /util/perl
parentdfb45dc82479929621c43db921ecfcecc08d3b94 (diff)
OpenSSL::Util::extract_pod_info(): Allow invisible names
This should be very unusual, but we do have a case of a name we don't want to display. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10621)
Diffstat (limited to 'util/perl')
-rw-r--r--util/perl/OpenSSL/Util/Pod.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/util/perl/OpenSSL/Util/Pod.pm b/util/perl/OpenSSL/Util/Pod.pm
index 9f63bf3f96..ca6d7de2c8 100644
--- a/util/perl/OpenSSL/Util/Pod.pm
+++ b/util/perl/OpenSSL/Util/Pod.pm
@@ -114,6 +114,7 @@ sub extract_pod_info {
die "Unknown input type";
}
+ my @invisible_names = ();
my %podinfo = ( section => $defaults{section});
# Regexp to split a text into paragraphs found at
@@ -143,6 +144,16 @@ sub extract_pod_info {
$podinfo{lastsecttext} = "";
}
+ # Add invisible names
+ if (m|^=for\s+openssl\s+names:\s*(.*)|s) {
+ my $x = $1;
+ my @tmp = map { map { s/\s+//g; $_ } split(/,/, $_) } $x;
+ print STDERR
+ "DEBUG: Found invisible names: ", join(', ', @tmp), "\n"
+ if $defaults{debug};
+ push @invisible_names, @tmp;
+ }
+
next if (m|^=| || m|^\s*$|);
# Collect the section text
@@ -168,11 +179,12 @@ sub extract_pod_info {
split(m|,|, $podinfo{lastsecttext});
print STDERR
- "DEBUG: Collected names are: ", join(', ', @names), "\n"
+ "DEBUG: Collected names are: ",
+ join(', ', @names, @invisible_names), "\n"
if $defaults{debug};
return ( section => $podinfo{section},
- names => [ @names ],
+ names => [ @names, @invisible_names ],
contents => $contents );
}