From 02dade0af9916f9ab2102312900443a4f1c3a6fb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 27 Oct 2009 16:11:10 +0000 Subject: [PATCH] Fix capacity strings to be more case-insensitive --- yarrg/web/check_capacitystring | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarrg/web/check_capacitystring b/yarrg/web/check_capacitystring index 4fd2054..321d754 100644 --- a/yarrg/web/check_capacitystring +++ b/yarrg/web/check_capacitystring @@ -85,7 +85,7 @@ my $parse_values= sub { elsif (s/^( $fqtyrex ) \s* t \s+ //xo) { $def->(0, $1 * 1000.0 ); } elsif (s/^( $fqtyrex ) \s* l \s+ //xo) { $def->(1, $1 ); } elsif (s/^( $fqtyrex ) \s* kl \s+ //xo) { $def->(1, $1 * 1000.0 ); } - elsif (s/^( $iqtyrex ) \s* ([a-z ]+) \s+ //xo) { + elsif (s/^( $iqtyrex ) \s* ([a-z ]+) \s+ //ixo) { my ($qty,$spec) = ($1,$2); $debugf->("VALUE COMMOD $qty '$spec'"); expected_error("Capacity specification must start with". @@ -129,7 +129,7 @@ my $parse_term= sub { $_ *= $pct / 100.0; } push @canon, sprintf "%g%%", $pct; - } elsif (!m/[^a-z]/) { + } elsif (!m/[^a-z]/i) { $debugf->("TERM NAME"); expected_error("Name (should be unit or commodity) \`$_'". " without preceding quantity") -- 2.30.2