You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performing a Fuse extended search for 'sao paulo' on an item that contains the text 'SAO PAULO' yields matches for [ [ 0, 2 ], [ 1, 2 ], [ 4, 8 ] ], and format-fuse returns them as SAO, AO an PAULO. Rendering those as shown in the readme causes the UI to show "SAOAO PAULO". Ideally, the resulting value would eliminate overlapping matches.
Suggestion will be to process match indices with this function:
functiongetNonOverlappingSets(originalSet){constsets=[...originalSet];// Sort the sets by the first element of each setsets.sort((a,b)=>a[0]-b[0]);letresult=[sets[0]];for(leti=1;i<sets.length;i++){// Get the last set in the result arrayletlastSet=result[result.length-1];// If the current set does not overlap with the last set, add it to the resultif(sets[i][0]>lastSet[1]){result.push(sets[i]);}}returnresult;}
Performing a Fuse extended search for 'sao paulo' on an item that contains the text 'SAO PAULO' yields matches for [ [ 0, 2 ], [ 1, 2 ], [ 4, 8 ] ], and format-fuse returns them as SAO, AO an PAULO. Rendering those as shown in the readme causes the UI to show "SAOAO PAULO". Ideally, the resulting value would eliminate overlapping matches.
Example:
Actual:
Expected:
The text was updated successfully, but these errors were encountered: