-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix strikethrough is applied to emoji in iOS #690
Conversation
src/parseExpensiMark.ts
Outdated
if (isAndroid) { | ||
// Blocks applying italic and strikethrough styles to emojis on Android | ||
if (isNative) { | ||
// Blocks applying italic and strikethrough styles to emojis on Native |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Blocks applying italic and strikethrough styles to emojis on Native | |
// Blocks applying italic and strikethrough styles to emojis on Android and iOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Thanks for the PR! cc @Skalakid since he has worked on a similar issue in the past |
OS: 'web', | ||
}, | ||
})); | ||
|
There was a problem hiding this comment.
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.
react-native-live-markdown/src/__tests__/parseExpensiMark.test.ts
Lines 73 to 80 in 5d999df
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}, | |
]); | |
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Let's wait until #689 is merged first |
Details
Strikethrough markdown is applied to emoji. This PR fixes it.
Related Issues
Expensify/App#62029
Manual Tests
Linked PRs