Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/Pod/Usage.pm
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ sub _handle_element_end {
# a colon to end all headings.
if($self->{USAGE_OPTIONS}->{-verbose} < 2) {
local $_ = $$self{PENDING}[-1][1];
## Do not completely lowercase the first word
s{^([A-Z])([A-Z]+)}{$1 . lc($2)}e;
s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge;
s/\s*$/:/ unless (/:\s*$/);
$_ .= "\n";
Expand Down Expand Up @@ -374,6 +376,8 @@ sub preprocess_paragraph {
## Change the title of the SYNOPSIS section to USAGE
s/^=head1\s+SYNOPSIS\s*$/=head1 USAGE/;
## Try to do some lowercasing instead of all-caps in headings
## Do not completely lowercase the first word
s{^([A-Z])([A-Z]+)}{$1 . lc($2)}e;
s{([A-Z])([A-Z]+)}{((length($2) > 2) ? $1 : lc($1)) . lc($2)}ge;
## Use a colon to end all headings
s/\s*$/:/ unless (/:\s*$/);
Expand Down