Skip to content

Commit

Permalink
Remove trailing spaces from place names
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 31, 2023
1 parent de3befd commit 43e0a0f
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -7040,9 +7040,14 @@ sub print_person
if(!defined($place)) {
$place = place({ person => $person, place => $placeofdeath, places_printed => \%places_printed });
}
if(defined($place) && ($place eq ' in , , ')) {
complain({ person => $person, warning => 'Assuming place of death is unknown' });
$place = undef;
if(defined($place)) {
if($place eq ' in , , ') {
complain({ person => $person, warning => 'Assuming place of death is unknown' });
$place = undef;
} elsif($place =~ /[\,;]\s*$/) {
complain({ person => $person, warning => "Removing trailing spaces from '$place'" });
$place =~ s/[\,;]\s*//g;
}
}
if(defined($place)) {
$bio .= $place;
Expand Down Expand Up @@ -7149,8 +7154,13 @@ sub print_person
}
}
} elsif((!$placeofmarriage) || ($placeofdeath ne $placeofmarriage)) {
$bio .= place({ person => $person, place => $placeofdeath });
$phrase->append(place({ person => $person, place => $placeofdeath }));
my $place = place({ person => $person, place => $placeofdeath });
if($place =~ /[\,;]\s*$/) {
complain({ person => $person, warning => "Removing trailing spaces from '$place'" });
$place =~ s/[\,;]\s*//g;
}
$bio .= $place;
$phrase->append($place);
}
$bio .= cite(@deathcitations);
$phrase->append(cite(@deathcitations));
Expand Down

0 comments on commit 43e0a0f

Please sign in to comment.