Skip to content

Commit

Permalink
Move sorting before splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Jan 16, 2025
1 parent 451a308 commit 2fe0e40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parseExpensiMark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,16 @@ function parseExpensiMark(markdown: string): MarkdownRange[] {
);
return [];
}
let markdownRanges = ranges;
const sortedRanges = sortRanges(ranges);
let markdownRanges = sortedRanges;
// 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
if (Platform.OS === 'android') {
markdownRanges = splitRangesOnEmojis(markdownRanges, 'italic');
markdownRanges = splitRangesOnEmojis(markdownRanges, 'strikethrough');
}
const sortedRanges = sortRanges(markdownRanges);
const groupedRanges = groupRanges(sortedRanges);

const groupedRanges = groupRanges(markdownRanges);
return groupedRanges;
}

Expand Down

0 comments on commit 2fe0e40

Please sign in to comment.