Skip to content

Commit 8b64dcb

Browse files
author
Wanasit Tanakitrungruang
committedMar 12, 2023
Fix: remove unused lookbehind pattern
1 parent 7108a59 commit 8b64dcb

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed
 

‎src/locales/en/parsers/ENCasualDateParser.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { AbstractParserWithWordBoundaryChecking } from "../../../common/parsers/
55
import { assignSimilarDate } from "../../../utils/dayjs";
66
import * as references from "../../../common/casualReferences";
77

8-
const PATTERN =
9-
/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night|(?<!\d\s*)day\s*after\s*tomorrow|(?<!\d\s*)day\s*before\s*yesterday)(?=\W|$)/i;
8+
const PATTERN = /(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i;
109

1110
export default class ENCasualDateParser extends AbstractParserWithWordBoundaryChecking {
1211
innerPattern(context: ParsingContext): RegExp {
@@ -45,15 +44,6 @@ export default class ENCasualDateParser extends AbstractParserWithWordBoundaryCh
4544
assignSimilarDate(component, targetDate);
4645
component.imply("hour", 0);
4746
}
48-
49-
if (lowerText.match(/after\s*tomorrow/)) {
50-
return references.theDayAfter(context.reference, 2);
51-
}
52-
53-
if (lowerText.match(/before\s*yesterday/)) {
54-
return references.theDayBefore(context.reference, 2);
55-
}
56-
5747
break;
5848
}
5949

0 commit comments

Comments
 (0)
Please sign in to comment.