From 0848408719d24b257f4bda25258f323571bf4284 Mon Sep 17 00:00:00 2001 From: Leslie Zimmermann Date: Wed, 9 Aug 2023 13:54:31 +0200 Subject: [PATCH] fix(highlight-matched-substrings): find matched substrings in fixtures case insensitive --- src/Geosuggest.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Geosuggest.tsx b/src/Geosuggest.tsx index c59cdce..59676f4 100644 --- a/src/Geosuggest.tsx +++ b/src/Geosuggest.tsx @@ -375,7 +375,7 @@ export default class GeoSuggest extends React.Component { matchedSubstrings: [ { length: userInput.length, - offset: fixture.label.indexOf(userInput) + offset: fixture.label.search(regex) } ], placeId: fixture.placeId || fixture.label