CoffeeToWaterRatio: Removing : from the default answer as it looks unsightly
parent
c88bedcd8b
commit
5d086ab37a
|
@ -62,7 +62,7 @@ handle remainder => sub {
|
||||||
return "1 g to 16.7 ml (0.035 oz. to 0.56 fl. oz.)", structured_answer => {
|
return "1 g to 16.7 ml (0.035 oz. to 0.56 fl. oz.)", structured_answer => {
|
||||||
data => {
|
data => {
|
||||||
title => '16.7 ml (0.56 fl. oz.)',
|
title => '16.7 ml (0.56 fl. oz.)',
|
||||||
subtitle => 'Coffee to water ratio per gram (0.035 ounces):',
|
subtitle => 'Coffee to water ratio per gram (0.035 ounces)',
|
||||||
},
|
},
|
||||||
templates => {
|
templates => {
|
||||||
group => 'text',
|
group => 'text',
|
||||||
|
|
|
@ -9,11 +9,12 @@ use DDG::Test::Goodie;
|
||||||
zci answer_type => "coffee_to_water_ratio";
|
zci answer_type => "coffee_to_water_ratio";
|
||||||
zci is_cached => 1;
|
zci is_cached => 1;
|
||||||
|
|
||||||
|
|
||||||
sub build_structured_answer {
|
sub build_structured_answer {
|
||||||
my ($input, $result) = @_;
|
my ($input, $result) = @_;
|
||||||
my ($title, $subtitle);
|
my ($title, $subtitle);
|
||||||
if ($input eq '') {
|
if ($input eq '') {
|
||||||
$subtitle = "Coffee to water ratio per gram (0.035 ounces):";
|
$subtitle = "Coffee to water ratio per gram (0.035 ounces)";
|
||||||
$title = "16.7 ml (0.56 fl. oz.)";
|
$title = "16.7 ml (0.56 fl. oz.)";
|
||||||
} else {
|
} else {
|
||||||
$subtitle = "Water calculation for coffee weight: $input";
|
$subtitle = "Water calculation for coffee weight: $input";
|
||||||
|
|
Loading…
Reference in New Issue