App: Strikethrough text is not working as expected if there's a space before the ~

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Expected Result:

Text shouldn’t be strikethrough

Actual Result:

Text is strikethrough

Action Performed:

  1. Navigate to a conversation
  2. Send this text ~this text shouldn't be crossed if there's a space behind ~ test

Workaround:

No need, visual issue.

Platform:

Where is this issue occurring?

Web ✔️ iOS Android Desktop App Mobile Web

Version Number: 1.0.43-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

View all open jobs on Upwork


From @mallenexpensify https://expensify.slack.com/archives/C01GTK53T8Q/p1620845857125700

When using multiple ~ in chat, markdown treats them as strikethrough. When there is a space before the second ~ we shouldn’t use that to denote the markdown.

Upwork job post: https://www.upwork.com/jobs/~0185450afd7993674c

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 39 (34 by maintainers)

Most upvoted comments

I think we should match whatever GitHub does. Looks like both of those examples you have @rdjuric are not struck through on GitHub

Ok, let’s open a new issue if we decide we need to make a change. Thanks!

Correct!

@parasharrajat let’s do it the same way github does.

Ok so just so we’re on the same page. Is this right?

We do want the markdown to apply when there is a space after:

  • inline code block
  • code fence
  • quote

We don’t want markdown to apply when there is a space after:

  • italic
  • bold
  • strikethrough

Seems like markdowns for:

  • Bold
  • Strikethrough
  • Italic
  • Code

Are affected by this.