Remove deprecated given/when calls
This commit is contained in:
parent
3c1832cf05
commit
826b1e5d94
@ -880,11 +880,9 @@ sub ordinal {
|
||||
|
||||
my ($key) = $val =~ /(\d)$/;
|
||||
my $ext = "th";
|
||||
given($key) {
|
||||
when("1") { $ext = "st"; }
|
||||
when("2") { $ext = "nd"; }
|
||||
when("3") { $ext = "rd"; }
|
||||
};
|
||||
if($key eq "1") { $ext = "st"; }
|
||||
if($key eq "2") { $ext = "nd"; }
|
||||
if($key eq "3") { $ext = "rd"; }
|
||||
|
||||
return $val.$ext;
|
||||
}
|
||||
@ -1089,11 +1087,10 @@ sub _markdown_underline {
|
||||
my $title = shift;
|
||||
my $type;
|
||||
|
||||
given($level) {
|
||||
when("#") { $type = "-="; }
|
||||
when("##") { $type = "="; }
|
||||
when("###") { $type = "-"; }
|
||||
}
|
||||
if($level eq "#") { $type = "-="; }
|
||||
if($level eq "##") { $type = "="; }
|
||||
if($level eq "###") { $type = "-"; }
|
||||
|
||||
return $title if(!$type);
|
||||
|
||||
# Build the underscores - may need additional trimming as 'type' can be multichar
|
||||
|
Loading…
x
Reference in New Issue
Block a user