-
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
[$250] Code block markdown renders incorrectly #53573
Comments
Triggered auto assignment to @JmillsExpensify ( |
@JmillsExpensify Eep! 4 days overdue now. Issues have feelings too... |
Job added to Upwork: https://www.upwork.com/jobs/~021866767677427055045 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
This isn't really related to convert/migrate/retain so I added it to quality. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Markdown doesn't currently support empty code blocks. What is the root cause of that problem?The user expects double backticks in the middle itself to be an empty code block. This is also mentioned in this comment. `hello` `` hi` However, the current regex doesn't allow this and requires inline code blocks to contain at least one non-whitespace character, a space, or a no-break space. What changes do you think we should make in order to solve the problem?Now that we allow spaces as content, there's no need to disallow empty content, as it's confusing for both users and developers. I suggest simplifying the regex. regex: /(\B|_|)`(.*?)`(\B|_|)(?!(?!<pre>)[^<]*(?:<(?!pre>)[^<]*)*<\/pre>|[^<]*<\/video>)/gm, Resolving this issue will also unblock #52780 (comment). What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?New test case to add
Existing test cases to updateTest inline code blocks with double backticks
Test inline code blocks with triple backticks
Test inline code with one backtick as content
Test inline code with multiple backtick symbols as content
Test inline code blocks with two backticks
Test for backticks only tab characters inside it
Test for inline code block with triple backtick with spaces as content
What alternative solutions did you explore? (Optional) |
@JmillsExpensify, @allroundexperts Eep! 4 days overdue now. Issues have feelings too... |
@QichenZhu's proposal looks good to me. I am pretty confident that if all our existing unit tests on regex pass after this change, we won't introduce any regression. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @jasperhuangg, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@JmillsExpensify @allroundexperts @jasperhuangg this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@JmillsExpensify, @allroundexperts, @jasperhuangg Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@jasperhuangg Kind bump |
@JmillsExpensify, @allroundexperts, @jasperhuangg Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 @QichenZhu 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@JmillsExpensify, @allroundexperts, @jasperhuangg, @QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Not overdue. PR is under review. |
@JmillsExpensify, @allroundexperts, @jasperhuangg, @QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@JmillsExpensify @allroundexperts @jasperhuangg @QichenZhu this issue is now 4 weeks old, please consider:
Thanks! |
There is already a PR upgrading expensify-common: #54685. |
@allroundexperts are you going to bump the dependancy version with this issue ? |
@JmillsExpensify, @allroundexperts, @jasperhuangg, @QichenZhu Huh... This is 4 days overdue. Who can take care of this? |
@JmillsExpensify, @allroundexperts, @jasperhuangg, @QichenZhu 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Update: #54685 has been merged, and I verified it fixed this issue. Screenshots/VideosAndroid: Nativeandroid-native.mp4Android: mWeb Chromeandroid-web.mp4iOS: Nativeios-native.mp4iOS: mWeb Safariios-web.mp4MacOS: Chrome / Safarimac-web.movMacOS: Desktopmac-desktop.mp4 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.71-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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
Expensify/Expensify Issue URL:
Issue reported by: @MonilBhavsar
Slack conversation (hyperlinked to channel name): expensify_bugs
Action Performed:
hello
`` hi`" (remove double quotes)Expected Result:
Message composed as
hello
`` hi`Actual Result:
Message composed as
hello
`` hi`Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @allroundexpertsThe text was updated successfully, but these errors were encountered: