File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ const ParameterInput = ({
240240 let lastIndex = 0 ;
241241
242242 // Create a regex pattern that matches any of the search terms
243- const pattern = searchTerms . map ( term => RegExp . escape ( term ) ) . join ( '|' ) ;
243+ const pattern = searchTerms . map ( term => term . replace ( / [ . * + ? ^ $ { } ( ) | [ \] \\ ] / g , '\\$&' ) ) . join ( '|' ) ;
244244 const regex = new RegExp ( `(${ pattern } )` , 'gi' ) ;
245245
246246 const matches = [ ...text . matchAll ( regex ) ] ;
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ const Config = () => {
100100 fullWidth
101101 variant = "outlined"
102102 size = "small"
103- placeholder = "Search parameters by name or description..."
103+ placeholder = "Search for parameters by name or description..."
104104 value = { searchTerm }
105105 onChange = { ( e ) => setSearchTerm ( e . target . value ) }
106106 InputProps = { {
You can’t perform that action at this time.
0 commit comments