Skip to content

Commit

Permalink
Complain if a notes record is the same as the description
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Oct 7, 2023
1 parent 0e2ef09 commit 00bb416
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -10649,25 +10649,29 @@ sub notes
$note =~ s/[\x93\x94]/"/g;
$note =~ s/[\x91\x92]/'/g;
$note =~ s/[\xc2\xe2]//g;
if($paragraph) {
if($encode) {
$rc .= '<p>' . HTML::Entities::encode($note) . '.</p>';
if($paragraph) {
$note =~ s/\n+/<\/p><p>/g;
if($rc ne $note) {
if($paragraph) {
if($encode) {
$rc .= '<p>' . HTML::Entities::encode($note) . '.</p>';
if($paragraph) {
$note =~ s/\n+/<\/p><p>/g;
}
} else {
$rc .= "<p>$note.</p>";
}
} else {
$rc .= "<p>$note.</p>";
if($rc) {
$rc .= ' ';
}
if($encode) {
$rc .= HTML::Entities::encode($note);
} else {
$rc .= $note;
}
$rc .= '.' if($note !~ /(\."?|<\/p>)$/);
}
} else {
if($rc) {
$rc .= ' ';
}
if($encode) {
$rc .= HTML::Entities::encode($note);
} else {
$rc .= $note;
}
$rc .= '.' if($note !~ /(\."?|<\/p>)$/);
complain("Note record ($note) is the same as the description");
}
} else {
complain('Notes field is empty');
Expand Down

0 comments on commit 00bb416

Please sign in to comment.