skip to replace link text which is a link#17451
Conversation
There was a problem hiding this comment.
Should we change the name newCommentMarkdown here to newCommentHtml
3f0e99c to
f680a88
Compare
There was a problem hiding this comment.
| "expensify-common": "git+https://github.com/eh2077/expensify-common.git#540a9451c0452277151b2a63ad46c9591da4e3f5", | |
| "expensify-common": "git+ssh://git@github.com/Expensify/expensify-common.git#c15668f73079d3f5f42618b70c852d36d387e121", |
Expensify/expensify-common#517 is merged
There was a problem hiding this comment.
@eh2077 Can we add a comment here explaining the logic behind it.
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-04-18.at.5.05.37.AM.movMobile Web - ChromeScreen.Recording.2023-04-18.at.5.09.52.AM.movMobile Web - SafariScreen.Recording.2023-04-18.at.5.13.12.AM.movDesktopScreen.Recording.2023-04-18.at.5.16.55.AM.moviOSScreen.Recording.2023-04-18.at.5.14.29.AM.movAndroidScreen.Recording.2023-04-18.at.5.07.40.AM.mov |
|
LGTM and tests well. cc @amyevans all yours. |
amyevans
left a comment
There was a problem hiding this comment.
Looks good, just some suggestions for improving comment clarity
There was a problem hiding this comment.
Nit pick, but let's move this line back to where it was to maintain alpha order.
Co-authored-by: Amy Evans <amy@expensify.com>
Co-authored-by: Amy Evans <amy@expensify.com>
Co-authored-by: Amy Evans <amy@expensify.com>
Co-authored-by: Amy Evans <amy@expensify.com>
Co-authored-by: Amy Evans <amy@expensify.com>
Co-authored-by: Amy Evans <amy@expensify.com>
beb6fc6 to
a033979
Compare
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/amyevans in version: 1.3.2-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.2-5 🚀
|
| const linkText = linkMatch && linkMatch[1]; | ||
| commentCopy = commentCopy.replace(`[${linkText}](${link})`, linkText); | ||
| // We want to match the anchor tag of the link and replace the whole anchor tag with the text of the anchor tag | ||
| const regex = new RegExp(`<(a)[^><]*href\\s*=\\s*(['"])(${Str.escapeForRegExp(link)})\\2(?:".*?"|'.*?'|[^'"><])*>([\\s\\S]*?)<\\/\\1>(?![^<]*(<\\/pre>|<\\/code>))`, 'gi'); |
There was a problem hiding this comment.
This caused the following bug:
#21417
We should not have ignored the case flag.
Details
Fixed Issues
$ #16475
PROPOSAL: #16475 (comment)
Tests
testhttps://www.facebook.com/hashtag/__main/?__eep__=6Offline tests
QA Steps
Same as test.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
mobile-chrome.mp4
Mobile Web - Safari
mobile-safar.mp4
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mp4