Add warning if someone attempts to create a multi-page SVG calendar.

This commit is contained in:
Dianne Skoll
2024-07-05 16:57:18 -04:00
parent d9ae417e01
commit e2185e773a
2 changed files with 19 additions and 1 deletions

View File

@@ -1008,7 +1008,17 @@ as were read from the C<remind -ppp> stream
sub render
{
my ($self, $cr, $settings) = @_;
my $done = 0;
my $warned = 0;
foreach my $e (@{$self->{entries}}) {
if ($settings->{svg} && $done) {
if (!$warned) {
print STDERR "WARNING: --svg can only output one page; ignoring subsequent\nmonths in a multi-month calendar.\n";
$warned = 1;
}
next;
}
$done = 1;
$e->render($cr, $settings);
}
}