-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[PAID] [$1000] Markdown - ~~~hello~~~ is inconsistent with other markdown like ***hello*** #25693
Comments
Triggered auto assignment to @strepanier03 ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Strikethrough markdown(~~~hello~~~) doesn't cross the word "hello" only. What is the root cause of that problem?I think the problem is replace regex of strikethrough markdown in
There is What changes do you think we should make in order to solve the problem?We need to update the replace regex rule of strikethrough markdown by removing
I tried jest test in What alternative solutions did you explore? (Optional)N/A |
Testing this now, was having an issue this morning with the Android app. |
Job added to Upwork: https://www.upwork.com/jobs/~01f3068ef97b3f01cd |
Current assignee @strepanier03 is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Strikethrough markdown(~~~hello~~~) doesn't cross the word "hello" only. What is the root cause of that problem?The problem is with the regex & the part of the regex causing the unexpected behavior is the ~~(?!~). In the given input ~~~text~~~, after the first tilde is matched, the regex finds two tildes not followed by another tilde, so it captures those two tildes as well as the word text. This is why we get the result with ~~text struck through and the trailing tildes remaining untouched. What changes do you think we should make in order to solve the problem?To modify the regex to strike through content only if there is one opening and one closing tilde, we just need to make a few adjustments:
The only change is adding another (?<!~) before the second tilde to ensure that it's not immediately preceded by another tilde. This ensures that we only strike through content surrounded by single tildes on each side. Slack like implementation:We can update the regex to work only if there is only one tilde on both sides & ignore if there is more than one. Thats how slack also works. What alternative solutions did you explore? (Optional)We can also strike through text if there is one or two tilde on both sides. Result (Slack like implementation)bug_demo.mp4 |
@strepanier03 @parasharrajat, can we confirm what is the expected result here. |
Will be checking it today... |
📣 @malaki12003! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@Krishna2323 Can you add more details about how will you solve this? I just see theory. |
@akamefi202's proposal looks good to me. Please make sure all tests pass and the pass issue does not pop up again. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @tylerkaraszewski, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@parasharrajat, I updated my proposal, @akamefi202 proposal will fail in some cases. I think it's better to ignore multiple tilde because they might cause some issues, GitHub & Slack also does the same. bug_demo_proposal.mp4 |
@parasharrajat - Friendly bump on the proposal update you asked for from @Krishna2323. Thanks! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.68-17 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-09-20. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@parasharrajat Could you please close this issue if there isn't any problem? |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Steps
Do you agree 👍 or 👎 ? |
@parasharrajat A suggestion - we should ask in slack channel on what more markdown issues / expectations are there and then include all those expectations as test cases in our regex tests. |
So that no more regex related bugs happen in future. And also we can ask for future/current regex requirements so that we can handle those in the regex and also add test cases related to it. |
I have already done that. I will ping the thread again. |
Working on payment and regression test stuff now, will have an update shortly. |
@parasharrajat - The bonus comment isn't taking into consideration the merge freeze. I don't want to deny the speed bonus if it should be eligible because the merge freeze wasn't accounted for. With the merge freeze considered, should the bonus get paid here? It looks like it should from this PR. |
It is a little complicated. There are two PRs and the first PR was created for the e-common repo which was held for merge freeze. Thus we couldn't create a second PR before the merge freeze. The first PR was ready to merge within a day and the second one was created only to update the version. Given this, I think it would have been merged within 3 days and thus should be applicable. @strepanier03 |
Thank you for weighing in @parasharrajat, I agree with your comments and that's the sense I got as well from viewing the two PRs. I will move forward with finalizing this and appreciate your quick response. I'll update once this is ready to close. |
Payment summary
|
@parasharrajat - Please feel free to put in your Manual Request for payment and let me know when you do. I'll assign Jason at that point to do the payment. @akamefi202 - You're paid out via Upwork and I closed the contract. Thank you both for your work here and being part of the community. |
@tylerkaraszewski, @strepanier03, @parasharrajat, @akamefi202 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Thanks @strepanier03 Feel free to close this, I can track payment in closed state. |
Awesome, I'll assign Jason and close this out. |
@JmillsExpensify - Payment summary here. Request is submitted and I'm closing now. Cheers! |
Payment requested as per #25693 (comment) |
$1,500 payment approved for @parasharrajat based on BZ summary. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Precondition: Logged into the Expensify App
Expected Result:
Strikethrough should cross the word "hello" only
Actual Result:
Strikethrough crosses the word "hello" and other characters
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.56-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug6173398_inconsistent_markdown.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: