feat(theme-algolia): add option.replaceSearchResultPathname to process/replaceAll search result urls (#8428)

Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
Anders Bech Mellson 2022-12-22 18:24:28 +01:00 committed by GitHub
parent 024474a7b9
commit 19ba0ff49d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 214 additions and 52 deletions

View file

@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import escapeStringRegexp from 'escape-string-regexp';
import {escapeRegexp} from '@docusaurus/utils';
import {validateDocFrontMatter} from '../frontMatter';
import type {DocFrontMatter} from '@docusaurus/plugin-content-docs';
@ -54,7 +54,7 @@ function testField(params: {
} catch (err) {
// eslint-disable-next-line jest/no-conditional-expect
expect((err as Error).message).toMatch(
new RegExp(escapeStringRegexp(message)),
new RegExp(escapeRegexp(message)),
);
}
});