Skip to content

Fix strikethrough is applied to emoji in iOS #690

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

Merged

Conversation

bernhardoj
Copy link
Contributor

Details

Strikethrough markdown is applied to emoji. This PR fixes it.

Related Issues

Expensify/App#62029

Manual Tests

  1. Type an emoji wrapped with strikethrough markdown
  2. Verify strikethrough is not applied to the emoji
Screenshot 2025-06-05 at 16 15 32

Linked PRs

if (isAndroid) {
// Blocks applying italic and strikethrough styles to emojis on Android
if (isNative) {
// Blocks applying italic and strikethrough styles to emojis on Native
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Blocks applying italic and strikethrough styles to emojis on Native
// Blocks applying italic and strikethrough styles to emojis on Android and iOS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tomekzaw
Copy link
Collaborator

tomekzaw commented Jun 5, 2025

Thanks for the PR! cc @Skalakid since he has worked on a similar issue in the past

OS: 'web',
},
}));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mocked the platform so it returns web because this test case will fail on Android/iOS platform because the italic range won't exist.

test('emoji and italic', () => {
expect('_😎_').toBeParsedAs([
{type: 'syntax', start: 0, length: 1},
{type: 'italic', start: 1, length: 2},
{type: 'emoji', start: 1, length: 2},
{type: 'syntax', start: 3, length: 1},
]);
});

Copy link
Collaborator

@Skalakid Skalakid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomekzaw
Copy link
Collaborator

tomekzaw commented Jun 5, 2025

Let's wait until #689 is merged first

@tomekzaw tomekzaw merged commit e9e2b94 into Expensify:main Jun 5, 2025
5 checks passed
@os-botify
Copy link
Contributor

os-botify bot commented Jun 5, 2025

🚀 Published to npm in 0.1.285 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants