From 54ff620e6b00d6271a0537dbf7fad5fba0be41a0 Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Mon, 23 Sep 2024 16:54:44 -0400 Subject: [PATCH] Fix spacing around unknown parents --- gedcom | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gedcom b/gedcom index e1ad151..b7ad0ef 100755 --- a/gedcom +++ b/gedcom @@ -3930,7 +3930,6 @@ sub print_person $phrase->append(', un ' . lc($soccupation) . ','); } } - $phrase->append(' '); } my @childrenofthisspouse; my $numberofchildrenwiththisspouse = $numberofchildren; @@ -3975,6 +3974,7 @@ sub print_person } } if(scalar(@childrenunknownparent) < $numberofchildren) { + $phrase->append(' '); if($placeofmarriage || $dateofmarriage) { if($language eq 'French') { $phrase->append("avec qu'"); @@ -4569,7 +4569,9 @@ sub print_person } if(scalar(@childrenunknownparent)) { - push @phrases, $phrase; + if($phrase->length()) { + push @phrases, $phrase; + } $bio->append(conjunction(map { $_->as_string() } @phrases))->append('. '); $phrase = Data::Text->new("$pronoun "); @phrases = (); @@ -5958,11 +5960,11 @@ sub print_person } } } else { # scalar(@residences) == 0 + if($phrase->length()) { + push @phrases, $phrase; + $phrase = Data::Text->new(); + } if(scalar(@phrases)) { - if($phrase->length()) { - push @phrases, $phrase; - $phrase = Data::Text->new(); - } # No residences - remove any trailing commas my $text = conjunction(map { $_->as_string() } @phrases); $text =~ s/[\,;]\s*$//;