docusaurus/packages/docusaurus-utils/src/regExpUtils.ts
Anders Bech Mellson 19ba0ff49d
feat(theme-algolia): add option.replaceSearchResultPathname to process/replaceAll search result urls (#8428)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
2022-12-22 18:24:28 +01:00

12 lines
340 B
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import escapeStringRegexp from 'escape-string-regexp';
export function escapeRegexp(string: string): string {
return escapeStringRegexp(string);
}