diff --git a/parser/index.ts b/parser/index.ts index 0022f0ba..24a05f40 100644 --- a/parser/index.ts +++ b/parser/index.ts @@ -160,7 +160,7 @@ function parseTreeToTextAndRanges(tree: StackItem): [string, Range[]] { } function sortRanges(ranges: Range[]) { - return ranges.sort((a, b) => a[1] - b[1] || b[2] - a[2] || a[0].localeCompare(b[0]) || 0); // sort by location to properly handle bold+italic + return ranges.sort((a, b) => a[1] - b[1] || b[2] - a[2] || 0); // sort by location to properly handle bold+italic } function parseExpensiMarkToRanges(markdown: string): Range[] { diff --git a/parser/react-native-live-markdown-parser.js b/parser/react-native-live-markdown-parser.js index 39d9c669..ed6117db 100644 --- a/parser/react-native-live-markdown-parser.js +++ b/parser/react-native-live-markdown-parser.js @@ -31,4 +31,4 @@ $2`},{name:"removeStyle",regex:/