-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix end parenthesis issue with urls in ExpensiMark #361
Fix end parenthesis issue with urls in ExpensiMark #361
Conversation
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.
Looks fantastic, just a few picky changes :D
__tests__/ExpensiMark-test.js
Outdated
@@ -283,3 +283,26 @@ test('Test general email link with various styles', () => { | |||
|
|||
expect(parser.replace(testString)).toBe(resultString); | |||
}); | |||
|
|||
test('Test link with brackets', () => { |
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.
I feel like a better name could be 'Test markdown and url links with inconsistent starting and closing parens'
.
Why? This subset of tests is unique because it's testing adding extra (
and )
at the beginning and end of links coming from pure urls & from markdown links.
I'm open to other names, but I think making it a bit more specific could be nice, since we already have url tests named 'Test a url ending with a closing parentheses autolinks correctly'
and 'Test markdown style link with various styles'
. If we make this test name super specific, this justifies why these test are in their own section.
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.
Surely, I agree.
Also when you mention "You can use the latest hash of the following PR into Expensify.cash and Try different URLs as per mentioned in the issue." would you mind adding additional detail (like the hash is just the latest commit id on your branch) or showing exactly what that would end up looking like? ( |
Co-authored-by: Alex Beaman <dabeamanator@gmail.com>
@Beamanator Updated. Thanks. |
3358a4c
to
dfe547c
Compare
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.
Looks great to me, let's see what other reviewer(s) have to say :D
Looks good to me as well. |
Please review @Beamanator
Details of the issue can be found here Expensify/App#1656
Explanation of the solution can be found in Expensify/App#1656 (comment) and Expensify/App#1656 (comment) comments.
Fixed Issues
$ Expensify/App#1656
Tests
What unit/integration tests cover your change? What auto QA tests cover your change?
I have added more tests to support the logic here.
What tests did you perform that validates your changes worked?
I have run the unit tests over the codebase which passed.
QA
into Expensify.cash and then following with
npm install
. Now you can test various URLs in the chat as mentioned in the issue.URls in chat messages.