From 5147c375599bbddaa08fc19055b7ce53acfae350 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 28 Sep 2024 12:13:06 +0800 Subject: [PATCH] add comment --- src/pages/home/report/ReportFooter.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/report/ReportFooter.tsx b/src/pages/home/report/ReportFooter.tsx index bb028b35ad48..cea77e8c7bb5 100644 --- a/src/pages/home/report/ReportFooter.tsx +++ b/src/pages/home/report/ReportFooter.tsx @@ -130,6 +130,7 @@ function ReportFooter({ * Group 2: Optional email group between \s+....\s* start rule with @+valid email or short mention * Group 3: Title is remaining characters */ + // The regex is copied from the expensify-common CONST file, but the domain is optional to accept short mention const emailWithOptionalDomainRegex = /(?=((?=[\w'#%+-]+(?:\.[\w'#%+-]+)*@?)[\w.'#%+-]{1,64}(?:@(?:(?=[a-z\d]+(?:-+[a-z\d]+)*\.)(?:[a-z\d-]{1,63}\.)+[a-z]{2,63}))?(?= |_|\b))(?.*))\S{3,254}(?=\k$)/; const taskRegex = `^\\[\\]\\s+(?:@(?:${emailWithOptionalDomainRegex.source}))?\\s*([\\s\\S]*)`;