Convert HTML to template
parent
8aa0d47817
commit
32fe30fa68
|
@ -185,11 +185,12 @@ handle query => sub {
|
|||
my $output_string = sprintf "%s ($input_format) is %s ($output_format).",
|
||||
ucfirst $input_time, @input_timezones,
|
||||
$output_time, @output_timezones;
|
||||
my $output_html = sprintf "<div class='zci--timezone-converter text--secondary'><span class='text--primary'>%s</span> ($input_format) is <span class='text--primary'>%s</span> ($output_format).</div>",
|
||||
ucfirst $input_time, @input_timezones,
|
||||
$output_time, @output_timezones;
|
||||
|
||||
return $output_string, html => $output_html;
|
||||
return $output_string, structured_answer => {
|
||||
input => [html_enc($query)],
|
||||
operation => 'Convert Timezone',
|
||||
result => html_enc($output_string),
|
||||
};
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue