App: [HOLD for payment 2023-03-09] [$4000] Inconsistent formatting on multi-line formatted auto-email
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
- Open staging.new.expensify.com
- Open a chat and send this :
~firstemail@gmail.com
secondemail@gmail.com~
- Send this one
~firstwebsite.com
secondwebsite.com~
Expected Result:
All of the text (both email and website) should be on strikethrough.
Actual Result:
While the website is all on strikethrough, the second email (secondemail@gmail.com) doesn’t got strikethrough.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- MacOS / Chrome / Safari
Version Number: v1.2.62-1 Reproducible in staging?: Y Reproducible in production?: Y 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:

Expensify/Expensify Issue URL: Issue reported by: @kerupuksambel Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1675115210540239
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0133c0accb82a12340
- Upwork Job ID: 1620489634218385408
- Last Price Increase: 2023-03-14
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 96 (60 by maintainers)
The one thing we need to circle back on is the appropriate payment. Our auto-increasing logic pushed this issue up to $8,000, though at that time we had already agreed on the path forward, asking Mark to re-state his final proposal. As a result, I do think $4,000 is the more accurate compensation though I’m curious for others thoughts. cc @NikkiWines @thesahindia
Regression Test Proposal
Bug: Multi-line bold/italic/strikethrough emails render incorrectly
Proposed Test Steps:
Do we agree 👍 or 👎
New job post here for good measure
Payment sent, contract ended @kerupuksambel!
Upwork job price has been updated to $4000
Regression Test Proposal
New tests were added in expensify-common to preserve the previous correct behavior not affected by this issue.
Proposed Test Steps:
Do we agree 👍 or 👎
Yeah let’s assign @marktoman and move forward.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Auto-emails do not properly trim bold/italic/strikethrough MD characters on multi-line.
What is the root cause of that problem?
The regex was made for single-line emails.
What changes do you think we should make in order to solve the problem?
The regex needs to be updated so it reliably prevents the characters from being included for both single-line and multi-line. We achieve this by preventing the email from starting with the *_~ characters. The established consensus is that such emails should not be supported and the major email providers don’t support them either.
What alternative solutions did you explore? (Optional)
None worth mentioning.
Going to hold on commenting so that @thesahindia can reply to @marktoman’s most recent comment first.
Also, IMO, we shouldn’t be going with RFC format for the email here.
~in the email isn’t allowed by big players which means that eventually RFC will change as well. Allowing for~in the email adds a lot of complexity to our regex.Ah no, do you mind getting that going? I’m working on some other R&D projects at the moment and I haven’t been able to circle back around to this.
Given that our app is still largely beta, we don’t need to worry too much about what users are used to. That said, this is a good one to bring out to discussion in our Slack community. I’ll circle back on that and CC those in this issue I can find using similar usernames to GH.
I should also note, one outstanding question is whether multi-line markdown should be supported. Clearly the issue right now is that we do support it, we just support it inconsistently. That said, I think it’s equally valid to question, should we stick to markdown within one line, before the break? I can only imagine this is one of several edge cases we’re going to face because we allow multi-line.