Merge pull request #580 from mwmiller/UPPERCASE

Uppercase: switch triggers to "start"-only.
master
Jag Talon 2014-08-15 11:09:21 -04:00
commit 48ea5bc032
2 changed files with 5 additions and 4 deletions

View File

@ -3,8 +3,10 @@ use DDG::Goodie;
use HTML::Entities;
triggers startend => 'uppercase', 'upper case', 'allcaps', 'all caps', 'strtoupper', 'toupper';
triggers start => 'uppercase', 'upper case', 'allcaps', 'all caps', 'strtoupper', 'toupper';
# leaving out 'uc' because of queries like "UC Berkley", etc
# 2014-08-10: triggers to "start"-only to make it act more like a "command"
# resolves issue with queries like "why do people type in all caps"
zci is_cached => 1;
zci answer_type => "uppercase";
@ -44,4 +46,4 @@ handle remainder => sub {
return;
};
1;
1;

View File

@ -18,8 +18,7 @@ ddg_goodie_test(
html => qr/THAT/),
'allcaps this string' => test_zci('THIS STRING',
html => qr/THIS STRING/),
'that string all caps' => test_zci('THAT STRING',
html => qr/THAT STRING/),
'that string all caps' => undef,
'is this uppercase, sir?' => undef,
);