remove brackets from conditions that are not needed

This commit is contained in:
Milan
2020-03-07 23:18:42 +01:00
parent 4584125923
commit ea9590f6dc
13 changed files with 23 additions and 25 deletions

View File

@@ -71,14 +71,14 @@ sub extractEventFromWikiText($;$) {
$category =~ s/\s+/ /g;
$category =~ s/^\s+|\s+$//g;
$category =~ s/\&/\+/g;
push @categories, $category if ( defined $category && $category =~ /\S/ );
push @categories, $category if defined $category && $category =~ /\S/;
$category = '';
$category = $2 if ( defined $2 );
$category =~ s/\s+/ /g;
$category =~ s/^\s+|\s+$//g;
$category =~ s/\&/\+/g;
push @categories, $category if ( defined $category && $category =~ /\S/ );
push @categories, $category if defined $category && $category =~ /\S/;
$title =~ s/\((.*?),(.*?)\)/\($2\)/;
}
if ( $title =~ /\((.*?)\)/ ) {
@@ -87,7 +87,7 @@ sub extractEventFromWikiText($;$) {
$category =~ s/^\s+|\s+$//g;
$category =~ s/\&/\+/g;
push @categories, $category if ( defined $category && $category =~ /\S/ );
push @categories, $category if defined $category && $category =~ /\S/;
$title =~ s/\((.*?)\)//;
}
$event->{categories} = \@categories if ( @categories > 0 );