Skip to content
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

fixed bug: Adding some text just after the closing backtick doesn't … #437

Conversation

brianmuks
Copy link
Contributor

…quote the text inside the backticks #8288

TAG_REVIEWER will you please review this?

[Explanation of the change or anything fishy that is going on]
Modified the regex to handle quotes with text as prefix or suffix :

regex: /(\B|_)&#x60;(.*?)&#x60;(\B|_)(?![^<]*<\/pre>)/g,

Fixed Issues

Expensify/App#8288 (comment)

Tests

  1. What unit/integration tests cover your change? What autoQA tests cover your change?

  2. What tests did you perform that validates your changed worked?
    I tried submitting the text below from report compose:
    "`a`" a and a"`b"

QA

  1. What does QA need to do to validate your changes?
  2. What areas to they need to test for regressions?
    Mostly just from compose and edit the submitted text.

@brianmuks brianmuks requested a review from a team as a code owner April 4, 2022 21:38
@github-actions
Copy link

github-actions bot commented Apr 4, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@melvin-bot melvin-bot bot requested review from TomatoToaster and removed request for a team April 4, 2022 21:38
@brianmuks
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@TomatoToaster TomatoToaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test to __tests__/ExpensiMark-HTML-test.js to verify that this is working?

@brianmuks
Copy link
Contributor Author

Could you add a test to __tests__/ExpensiMark-HTML-test.js to verify that this is working?

Done!

@brianmuks brianmuks force-pushed the fix-backick-with-text-surfix-breaks branch 4 times, most recently from b6dd8a3 to ad9f615 Compare April 5, 2022 05:31
@Beamanator Beamanator self-requested a review April 5, 2022 12:40
Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few little spelling fixes

expect(parser.replace(testString)).toBe(resultString);
});

test('Test surfix for qoutes', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test('Test surfix for qoutes', () => {
test('Test suffix for quotes', () => {

@@ -418,3 +418,15 @@ test('Test autolink with . before a slash', () => {
const resultString = '<a href="https://www.google.com/maps/place/Poster+Auctions+International,+Inc./@40.7384572,-73.9942151,20.17z/data=!4m13!1m7!3m6!1s0x89c259a2c5fdee77:0x1439488db9133bae!2s26+W+17th+St,+New+York,+NY+10011!3b1!8m2!3d40.7383679!4d-73.993907!3m4!1s0x89c259a2c438eb63:0x115ba65a3675338b!8m2!3d40.7384793!4d-73.9937764" target="_blank" rel="noreferrer noopener">https://www.google.com/maps/place/Poster+Auctions+International,+Inc./@40.7384572,-73.9942151,20.17z/data=!4m13!1m7!3m6!1s0x89c259a2c5fdee77:0x1439488db9133bae!2s26+W+17th+St,+New+York,+NY+10011!3b1!8m2!3d40.7383679!4d-73.993907!3m4!1s0x89c259a2c438eb63:0x115ba65a3675338b!8m2!3d40.7384793!4d-73.9937764</a>';
expect(parser.replace(testString)).toBe(resultString);
});

test('Test prefix for qoutes', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test('Test prefix for qoutes', () => {
test('Test prefix for quotes', () => {

@brianmuks brianmuks force-pushed the fix-backick-with-text-surfix-breaks branch from 907ec42 to ad9f615 Compare April 5, 2022 12:50
@brianmuks
Copy link
Contributor Author

Looks good, just a few little spelling fixes

Thanks I have made the needed changes. 🙏🏾

expect(parser.replace(testString)).toBe(resultString);
});

test('Test surfix for quotes', () => {
Copy link
Contributor

@TomatoToaster TomatoToaster Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to still fix this one then I think this LGTM

Suggested change
test('Test surfix for quotes', () => {
test('Test suffix for quotes', () => {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to still fix this one then I think this LGTM

Done. Sorry for the typos. I need a vs-code extension for spell check 😃 .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol I would like that extension too 😆

@brianmuks brianmuks force-pushed the fix-backick-with-text-surfix-breaks branch from 7b8afe5 to ad9f615 Compare April 5, 2022 17:32
Beamanator
Beamanator previously approved these changes Apr 5, 2022
Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

TomatoToaster
TomatoToaster previously approved these changes Apr 6, 2022
@TomatoToaster
Copy link
Contributor

Ahh actually sorry @brianmuks, we can't merge your PR because your commits are unsigned. That's my bad on not catching that earlier! Could you follow the instructions here: https://github.com/Expensify/App/blob/main/CONTRIBUTING.md and open a new PR with these changes.

@brianmuks
Copy link
Contributor Author

Ahh actually sorry @brianmuks, we can't merge your PR because your commits are unsigned. That's my bad on not catching that earlier! Could you follow the instructions here: https://github.com/Expensify/App/blob/main/CONTRIBUTING.md and open a new PR with these changes.

Thanks. I will do just that.

@brianmuks brianmuks dismissed stale reviews from TomatoToaster and Beamanator via ad9f615 April 7, 2022 10:20
@brianmuks brianmuks force-pushed the fix-backick-with-text-surfix-breaks branch from 725e209 to ad9f615 Compare April 7, 2022 10:20
@brianmuks brianmuks force-pushed the fix-backick-with-text-surfix-breaks branch 9 times, most recently from de03c87 to ad9f615 Compare April 7, 2022 11:23
@brianmuks brianmuks closed this Apr 7, 2022
@brianmuks brianmuks deleted the fix-backick-with-text-surfix-breaks branch April 7, 2022 11:33
@brianmuks
Copy link
Contributor Author

Ahh actually sorry @brianmuks, we can't merge your PR because your commits are unsigned. That's my bad on not catching that earlier! Could you follow the instructions here: https://github.com/Expensify/App/blob/main/CONTRIBUTING.md and open a new PR with these changes.

@TomatoToaster new PR with amends is ready :
#439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants