CoffeeToWaterRatio: Removing : from the default answer as it looks unsightly

master
Rob 2016-06-09 12:44:33 +01:00
parent c88bedcd8b
commit 5d086ab37a
2 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,7 @@ handle remainder => sub {
return "1 g to 16.7 ml (0.035 oz. to 0.56 fl. oz.)", structured_answer => {
data => {
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 => {
group => 'text',

View File

@ -9,11 +9,12 @@ use DDG::Test::Goodie;
zci answer_type => "coffee_to_water_ratio";
zci is_cached => 1;
sub build_structured_answer {
my ($input, $result) = @_;
my ($title, $subtitle);
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.)";
} else {
$subtitle = "Water calculation for coffee weight: $input";