summaryrefslogtreecommitdiff
path: root/localmarkdown2sms
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2009-08-13 20:38:38 +0200
committerJonas Smedegaard <dr@jones.dk>2009-08-13 20:38:38 +0200
commit95a00e11d0dd65d2d45d2446d52894c144e6fa10 (patch)
tree59b3429a6b277b888b581132e5e7e9f8e0d5976d /localmarkdown2sms
parent1d536eaeadcdfe74ec1a172d4ae17772fbc8dca4 (diff)
Simplify warning logic, silencing warning about empty lines.
Diffstat (limited to 'localmarkdown2sms')
-rwxr-xr-xlocalmarkdown2sms8
1 files changed, 4 insertions, 4 deletions
diff --git a/localmarkdown2sms b/localmarkdown2sms
index 0ca6abb..745ae83 100755
--- a/localmarkdown2sms
+++ b/localmarkdown2sms
@@ -101,10 +101,10 @@ foreach my $file (read_dir( $path )) {
if ($content ne $1) {
WARN "delay (${delay}s) resolved from fuzzy string \"$content\" in file \"$file\"";
}
- } elsif ($skipkey) {
+ } elsif ($skipkey or $warn_nonkey_delay) {
# skipping - already warned about it...
} else {
- WARN "ignoring non-key'ed delay line \"$1\" in file \"$file\"" unless ($warn_nonkey_delay);
+ WARN "ignoring non-key'ed delay line \"$1\" in file \"$file\"";
$warn_nonkey_delay = 1;
$skipcontent = 1;
}
@@ -123,10 +123,10 @@ foreach my $file (read_dir( $path )) {
};
if ( defined( $key ) and not ($skipcontent)) {
$reply{$key}[$i] .= $content;
- } elsif ($skipkey or $skipcontent) {
+ } elsif ($skipkey or $skipcontent or $warn_nonkey_content) {
# skipping - already warned about it...
} else {
- WARN "skipping non-key'ed content \"$line\" in file \"$file\"" unless ($warn_nonkey_content);
+ $content =~ /\S/s && WARN "skipping non-key'ed content \"$line\" in file \"$file\"";
$warn_nonkey_content = 1;
}
}