Open lanitochka17 opened 4 days ago
Triggered auto assignment to @sonialiap (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Edited by proposal-police: This proposal was edited at 2024-11-28 14:20:12 UTC.
Chat - A message between only 1 backtick creates a code block
the codefence regex will not match because it's requiring a newline character (\r\n|\n)
, and that requirement for newline characters prevents it from matching inline code, so this will work on multiple line only but not inline.
Then after, the inlinecode regex match which only requires one backtick and it's rule get applied and we see two other backticks treated as normal text.
we need to update the codefence regex to deal with both cases and allow content within the block to span multiple lines or remain inline.
regex: /(```)(.*?)(?:(\r\n|\n).*?(\r\n|\n)|.*?)(```)/g
We may want to remove inlinecode rule, it's confusing to have both at the same time I think.
N/A
Job added to Upwork: https://www.upwork.com/jobs/~021862475730653768184
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann (External
)
Chat - A message between only 1 backtick creates a code block
When user input ```test```, it didn't match with the current regex.
regex: /(```.*?(\r\n|\n))((?:\s*?(?!(?:\r\n|\n)?```(?!`))[\S])+\s*?(?:\r\n|\n))(```)/g,
We can change this regex like below.
regex: /(`{3}.*?(\r\n|\n))((?:\s*?(?!(?:\r\n|\n)?`{3}(?!`))[\S])+\s*?(?:\r\n|\n))(`{3})|`{3}(.*?)`{3}/g
I tested this regex;
N/A
Your Expensify account email: anasup1995@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01aff093c9a804b145
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
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.66-8 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5175216 Email or phone of affected tester (no customers): buiminhanh08062023+1996@gmail.com Issue reported by: Applause - Internal Team
Action Performed:
text
"Expected Result:
Because a message between three backticks should create a code block, so that it should create a code block with "text" in this code block
Actual Result:
It created a code block with "
text
" in this code block. It means only need a pair of backtick to create a code blockWorkaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/78feb86d-8c88-455a-b7ac-792e4a5a1dea
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @DylanDylann