Conversions: Expanding the unit bodging for Ounces (#1767); I incorrectly diagnosed the issue, as it's actually broken due to amiguity around "ounces"
parent
74ea62d38d
commit
02a9ce86ee
|
@ -72,7 +72,7 @@ handle query_lc => sub {
|
|||
$_ =~ s/ degrees (celsius|fahrenheit)/ $1/;
|
||||
|
||||
# hack - convert "oz" to "fl oz" if "ml" contained in query
|
||||
s/(oz|ounces)/fl oz/ if(/ml/ && not /fl oz/);
|
||||
s/\b(oz|ounces)/fl oz/ if(/(ml|cup[s]?)/ && not /fl oz/);
|
||||
|
||||
# guard the query from spurious matches
|
||||
return unless $_ =~ /$guard/;
|
||||
|
|
|
@ -640,11 +640,11 @@ ddg_goodie_test(
|
|||
}
|
||||
),
|
||||
'how many ounces in a cup' => test_zci(
|
||||
'1 us cup = 16 fluid ounces',
|
||||
'1 us cup = 8 us fluid ounces',
|
||||
structured_answer => {
|
||||
input => ['1 us cup'],
|
||||
operation => 'convert',
|
||||
result => '16 fluid ounces'
|
||||
result => '8 us fluid ounces'
|
||||
}
|
||||
),
|
||||
# Unusual number formats
|
||||
|
|
Loading…
Reference in New Issue