Skip to content

Commit ede116b

Browse files
committed
Extract the date regex
1 parent dd064ba commit ede116b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

website/src/queries-logic.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const { throttling } = require("@octokit/plugin-throttling");
55
/* Filtering constants. */
66
const attributeRgx = '([a-z]+)';
77
const operatorRgx = '(<=|>=|[<=>])';
8-
const valueRgx = '([0-9]{4}-[0-9]{2}-[0-9]{2}|[0-9]+)';
8+
const dateRgx = '[0-9]{4}-[0-9]{2}-[0-9]{2}';
9+
const valueRgx = `(${dateRgx}|[0-9]+)`;
910
const regex = new RegExp(attributeRgx + operatorRgx + valueRgx);
1011
const mapTable = {
1112
'ahead': 'ahead_by',

0 commit comments

Comments
 (0)