Skip to content

Commit

Permalink
Merge pull request duckduckgo#3593 from hchienjo/add_triggers
Browse files Browse the repository at this point in the history
Roman Numerals: Add more trigger words.
  • Loading branch information
GuiltyDolphin authored Sep 3, 2016
2 parents f79cef4 + 42d1b11 commit 3d6acf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DDG/Goodie/Roman.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ zci answer_type => "roman_numeral_conversion";

handle remainder => sub {
my $in = uc shift;
$in =~ s/(?:\s*|in|numerals?|number|\s*)//gi;
$in =~ s/(?:\s*|in|to|numerals?|number|\s*)//gi;

return unless $in;

Expand Down
2 changes: 2 additions & 0 deletions t/Roman.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ddg_goodie_test(
'roman IV' => build_test('4 (roman numeral conversion)', 'IV', '4'),
'10 in roman numeral' => build_test('X (roman numeral conversion)', '10', 'X'),
'11 in roman numerals' => build_test('XI (roman numeral conversion)', '11', 'XI'),
'xiii to arabic' => build_test('13 (roman numeral conversion)', 'XIII', '13'),
'20 to roman numerals' => build_test('XX (roman numeral conversion)', '20', 'XX'),
);

done_testing;

0 comments on commit 3d6acf2

Please sign in to comment.