Skip to content

Commit

Permalink
Add review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Jan 20, 2025
1 parent 8c891fe commit b57de63
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/parseExpensiMark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ function parseTreeToTextAndRanges(tree: StackItem): [string, MarkdownRange[]] {
return [text, ranges];
}

const isAndroid = Platform.OS === 'android';

function parseExpensiMark(markdown: string): MarkdownRange[] {
if (markdown.length > MAX_PARSABLE_LENGTH) {
return [];
Expand All @@ -252,9 +254,8 @@ function parseExpensiMark(markdown: string): MarkdownRange[] {
);
return [];
}
const sortedRanges = sortRanges(ranges);
let markdownRanges = sortedRanges;
if (Platform.OS === 'android') {
let markdownRanges = sortRanges(ranges);
if (isAndroid) {
// Blocks applying italic and strikethrough styles to emojis on Android
// TODO: Remove this condition when splitting emojis inside the inline code block will be fixed on the web
markdownRanges = splitRangesOnEmojis(markdownRanges, 'italic');
Expand Down

0 comments on commit b57de63

Please sign in to comment.