Closed jcheroske closed 7 years ago
The replace() call is missing a '$' character:
replace()
Original file:
const ESCAPE_PATTERN = /[|\\{}()[\]^$+*?.]/g; export default (value : string) => value .replace(ESCAPE_PATTERN, '\\&');
Should be
const ESCAPE_PATTERN = /[|\\{}()[\]^$+*?.]/g; export default (value : string) => value .replace(ESCAPE_PATTERN, '\\$&'); // <-- need a $ here!
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
The
replace()
call is missing a '$' character:Original file:
Should be
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions