From b8fda89aac6c5b0fb4392110314bb5132e7d12bf Mon Sep 17 00:00:00 2001 From: Rob Date: Tue, 24 May 2016 17:50:14 +0100 Subject: [PATCH] MakeMeASandwich: Switching to raw text template! --- lib/DDG/Goodie/MakeMeASandwich.pm | 10 +++++----- share/goodie/make_me_asandwich/content.handlebars | 6 ------ t/MakeMeASandwich.t | 10 +++++----- 3 files changed, 10 insertions(+), 16 deletions(-) delete mode 100755 share/goodie/make_me_asandwich/content.handlebars diff --git a/lib/DDG/Goodie/MakeMeASandwich.pm b/lib/DDG/Goodie/MakeMeASandwich.pm index 8a321048c..c37254cd7 100755 --- a/lib/DDG/Goodie/MakeMeASandwich.pm +++ b/lib/DDG/Goodie/MakeMeASandwich.pm @@ -25,13 +25,13 @@ handle remainder => sub { return $result, structured_answer => { data => { - result => $result, - input => $input + title => $result, + subtitle => [ + { text => $input }, + { text => "XKCD 149", href => "https://duckduckgo.com/?q=xkcd%20149" } + ] }, templates => { - options => { - content => 'DDH.make_me_asandwich.content' - }, group => 'text' } }; diff --git a/share/goodie/make_me_asandwich/content.handlebars b/share/goodie/make_me_asandwich/content.handlebars deleted file mode 100755 index 02d4d5131..000000000 --- a/share/goodie/make_me_asandwich/content.handlebars +++ /dev/null @@ -1,6 +0,0 @@ -
-

{{result}}

-

- xkcd 149: {{input}} -

-
\ No newline at end of file diff --git a/t/MakeMeASandwich.t b/t/MakeMeASandwich.t index a2cb29d0f..1fb888302 100755 --- a/t/MakeMeASandwich.t +++ b/t/MakeMeASandwich.t @@ -18,13 +18,13 @@ sub build_test my ($text, $input) = @_; return test_zci($text, structured_answer => { data => { - result => $text, - input => $input + title => $text, + subtitle => [ + { text => $input }, + { text => "XKCD 149", href => "https://duckduckgo.com/?q=xkcd%20149"} + ] }, templates => { - options => { - content => 'DDH.make_me_asandwich.content' - }, group => 'text' } });