From cc47e6079626759bacefe933d66887111da4a502 Mon Sep 17 00:00:00 2001 From: jagtalon Date: Wed, 8 Oct 2014 20:16:01 +0000 Subject: [PATCH 1/2] Editor: "editor" on its own is too broad of a trigger I was thinking that if I typed in "javascript editor," I would expect to see a list of text editors instead of an actual web-based editor. --- lib/DDG/Spice/Editor.pm | 2 +- t/Editor.t | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/DDG/Spice/Editor.pm b/lib/DDG/Spice/Editor.pm index 1e5a1540bc..cf0dc917d8 100644 --- a/lib/DDG/Spice/Editor.pm +++ b/lib/DDG/Spice/Editor.pm @@ -17,7 +17,7 @@ attribution github => ['https://github.com/jmg','Juan Manuel García'], email => ['jmg.utn@gmail.com','Juan Manuel García']; -triggers startend => 'editor'; +triggers startend => 'web editor', 'online editor', 'syntax highlighter', 'syntax highlighting'; spice call_type => 'self'; my @supported_languages = ("javascript", "python"); diff --git a/t/Editor.t b/t/Editor.t index d3c2c70d50..5ec89cc385 100644 --- a/t/Editor.t +++ b/t/Editor.t @@ -7,27 +7,27 @@ use DDG::Test::Spice; ddg_spice_test( [qw( DDG::Spice::Editor )], - 'python editor' => test_spice( + 'python web editor' => test_spice( 'python', call_type => 'self', caller => 'DDG::Spice::Editor', ), - 'editor python' => test_spice( + 'online editor python' => test_spice( 'python', call_type => 'self', caller => 'DDG::Spice::Editor', ), - 'javascript editor' => test_spice( + 'javascript web editor' => test_spice( 'javascript', call_type => 'self', caller => 'DDG::Spice::Editor', ), - 'editor javascript' => test_spice( + 'syntax highlighter javascript' => test_spice( 'javascript', call_type => 'self', caller => 'DDG::Spice::Editor', ), - 'editor JavaScript' => test_spice( + 'online editor JavaScript' => test_spice( 'JavaScript', call_type => 'self', caller => 'DDG::Spice::Editor', From bfbb04c265fca93171a36a434cf3570b7f43f950 Mon Sep 17 00:00:00 2001 From: jagtalon Date: Wed, 8 Oct 2014 20:51:12 +0000 Subject: [PATCH 2/2] Editor.pm: Add "code viewer" as a trigger. --- lib/DDG/Spice/Editor.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DDG/Spice/Editor.pm b/lib/DDG/Spice/Editor.pm index cf0dc917d8..f141876c71 100644 --- a/lib/DDG/Spice/Editor.pm +++ b/lib/DDG/Spice/Editor.pm @@ -17,7 +17,7 @@ attribution github => ['https://github.com/jmg','Juan Manuel García'], email => ['jmg.utn@gmail.com','Juan Manuel García']; -triggers startend => 'web editor', 'online editor', 'syntax highlighter', 'syntax highlighting'; +triggers startend => 'web editor', 'online editor', 'syntax highlighter', 'syntax highlighting', 'code viewer'; spice call_type => 'self'; my @supported_languages = ("javascript", "python");