-
Notifications
You must be signed in to change notification settings - Fork 136
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
[Mentions v2] Add new rule in ExpensiMark for room mentions #680
Conversation
Thanks @rlinoz, I've added tests and comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add at least 1 test for room names with -
since that will probably be a pretty common use-case? Ex: #room-name
, maybe even #room-123
…hyphens and numbers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me!
{ | ||
name: 'roomMentions', | ||
|
||
regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,80})/gmiu, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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.
Important
Room mentions consists of
#
symbol followed by room name. Room name consist of any char sequence connected by hyphens (no spaces is allowed inside room name)Fixed Issues
$ Expensify/App#39538
Tests
I've created multiple unit tests to cover most of the possible usages of room/report mentions. Room mentions consists of
#
symbol followed by room nameCheck if existing unit tests are not failing after my. changes, added additional tests to cover room mentions
QA
Room mentions are not yet visible inside E/App, so to validate this changes we should only check for regressions or other markdown rules
Room mention syntax is very similar to Heading syntax. Extensive testing of this aspeect of markdown parser is recommended. Moreover all other markdown rules should be untouched