summaryrefslogtreecommitdiff
path: root/app/Core/Lexer.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-04 17:35:52 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-04 17:35:52 -0400
commit198f3eda90807c0295a013cd4ebdc3806545d608 (patch)
tree07420711d703bf71f0b1596a891ec6957c71719b /app/Core/Lexer.php
parent0e5756ecc162a8428e6ab3820562f45ef17f9e8b (diff)
Add search attribute to search by reference
Diffstat (limited to 'app/Core/Lexer.php')
-rw-r--r--app/Core/Lexer.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Core/Lexer.php b/app/Core/Lexer.php
index d277f998..f6978bbd 100644
--- a/app/Core/Lexer.php
+++ b/app/Core/Lexer.php
@@ -33,6 +33,8 @@ class Lexer
"/^(category:)/" => 'T_CATEGORY',
"/^(column:)/" => 'T_COLUMN',
"/^(project:)/" => 'T_PROJECT',
+ "/^(ref:)/" => 'T_REFERENCE',
+ "/^(reference:)/" => 'T_REFERENCE',
"/^(\s+)/" => 'T_WHITESPACE',
'/^([<=>]{0,2}[0-9]{4}-[0-9]{2}-[0-9]{2})/' => 'T_DATE',
'/^(yesterday|tomorrow|today)/' => 'T_DATE',
@@ -124,6 +126,7 @@ class Lexer
case 'T_STATUS':
case 'T_DUE':
case 'T_DESCRIPTION':
+ case 'T_REFERENCE':
$next = next($tokens);
if ($next !== false && ($next['token'] === 'T_DATE' || $next['token'] === 'T_STRING')) {