Fix overtriggering. (#4457)
parent
242793b659
commit
d0b3a242db
|
@ -195,6 +195,7 @@ handle query => sub {
|
|||
return if $query =~ m/^\)|\($/; # shouldn't open with a closing brace or finish with an opening brace
|
||||
return if $query =~ m/(a?cosh?|tau|a?sin|a?tan|log|ln|exp|tanh|cbrt|cubed?)e?$/i; # stops empty functions at end or with <func>e
|
||||
return if $query =~ m#(?:x(\^|/)|(\^|/)x)#; # stops triggering on what is most likely algebra
|
||||
return if $query =~ m#^0\d+/\d+$#;
|
||||
|
||||
# some shallow preprocessing of the query
|
||||
$query =~ s/^(?:what is|calculat(e|or)|solve|math)//i;
|
||||
|
|
|
@ -543,6 +543,7 @@ ddg_goodie_test(
|
|||
')1108278829' => undef,
|
||||
'24score' => undef,
|
||||
'24 score' => undef,
|
||||
'06026/6126' => undef,
|
||||
);
|
||||
|
||||
done_testing;
|
||||
|
|
Loading…
Reference in New Issue