Merge pull request #903 from puskin94/calculator

Fixed Calculator IA including PercentOf code
master
Jag Talon 2015-01-08 16:57:52 -05:00
commit 3ee8143c15
1 changed files with 1 additions and 0 deletions

View File

@ -74,6 +74,7 @@ handle query_nowhitespace => sub {
return if ($query =~ /\b0x/); # Probable attempt to express a hexadecimal number, query_nowhitespace makes this overreach a bit.
return if ($query =~ $network); # Probably want to talk about addresses, not calculations.
return if ($query =~ qr/(?:(?<pcnt>\d+)%(?<op>(\+|\-|\*|\/))(?<num>\d+)) | (?:(?<num>\d+)(?<op>(\+|\-|\*|\/))(?<pcnt>\d+)%)/); # Probably want to calculate a percent ( will be used PercentOf )
$query =~ s/^(?:whatis|calculate|solve|math)//;