-
Notifications
You must be signed in to change notification settings - Fork 151
[Mentions v2] Add new rule in ExpensiMark for room mentions #680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8b1666e
9b9a1af
b47e677
003c781
278378b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,6 +169,19 @@ export default class ExpensiMark { | |
| }, | ||
| }, | ||
|
|
||
| /** | ||
| * A room mention is a string that starts with the '#' symbol and is followed by a valid room name. | ||
| * | ||
| * Note: We are allowing mentions in a format of #room-name The room name can contain any | ||
| * combination of letters and hyphens | ||
| */ | ||
| { | ||
|
robertKozik marked this conversation as resolved.
|
||
| name: 'roomMentions', | ||
|
|
||
| regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,80})/gmiu, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NAB but certain improvements were introduced as mentioned in this issue with respect to identifying room mentions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In response to the issue Expensify/App#57195, we added in PR https://github.com/Expensify/expensify-common/pull/840/files the identification of room mentions with |
||
| replacement: '<mention-report>$1</mention-report>', | ||
| }, | ||
|
|
||
| /** | ||
| * This regex matches a valid user mention in a string. | ||
| * A user mention is a string that starts with the '@' symbol and is followed by a valid user's primary | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.