Skip to content

Commit

Permalink
fix: frontend created gambit
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Oct 18, 2023
1 parent 55e24e5 commit eb51cd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import IGambit from '../IGambit';

export default class CreatedGambit implements IGambit {
pattern(): string {
return 'created:(\\d{4}\\-\\d\\d\\-\\d\\d(?:\\.\\.\\d{4}\\-\\d\\d\\-\\d\\d))?';
return 'created:(\\d{4}\\-\\d\\d\\-\\d\\d(?:\\.\\.(\\d{4}\\-\\d\\d\\-\\d\\d))?)';
}

toFilter(matches: string[], negate: boolean): Record<string, any> {
Expand Down
4 changes: 2 additions & 2 deletions framework/core/js/tests/unit/common/GambitManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ test('gambits are only applied for the correct resource type', function () {
q: 'lorem created:2023-07-07 is:hidden author:behz',
email: '[email protected]',
});
expect(gambits.apply('discussions', { q: 'lorem created:2023-07-07 is:hidden -author:behz email:[email protected]' })).toStrictEqual({
expect(gambits.apply('discussions', { q: 'lorem created:2023-07-07..2023-10-18 is:hidden -author:behz email:[email protected]' })).toStrictEqual({
q: 'lorem email:[email protected]',
created: '2023-07-07',
created: '2023-07-07..2023-10-18',
hidden: true,
'-author': ['behz'],
});
Expand Down

0 comments on commit eb51cd5

Please sign in to comment.