Revert "Limit Calculator trigger must has one number at least"

This reverts commit fe124310de.
This commit is contained in:
Yeechan Lu 2014-03-19 22:32:01 +08:00
parent 4d299f5b17
commit bc85b3599e

View File

@ -20,7 +20,6 @@ namespace Wox.Plugin.System
@"==|~=|&&|\|\||" +
@"[ei]|[0-9]|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
@")+$", RegexOptions.Compiled);
private static Regex regHasNumber = new Regex(@"[0-9]", RegexOptions.Compiled);
private static Regex regBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled);
private static ParseContext yampContext = null;
private PluginInitContext context { get; set; }
@ -36,7 +35,6 @@ namespace Wox.Plugin.System
{
if (string.IsNullOrEmpty(query.RawQuery)
|| query.RawQuery.Length < 2 // don't affect when user only input "e" or "i" keyword
|| !regHasNumber.IsMatch(query.RawQuery) // must has one number
|| !regValidExpressChar.IsMatch(query.RawQuery)
|| !IsBracketComplete(query.RawQuery)) return new List<Result>();