underscore _splitIntoSections to avoid being included in client side code

pull/3374/head
Yuxuan Zhang 2 years ago committed by GitHub
parent 198228fcea
commit 9e5c8ee77d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -132,7 +132,7 @@ export async function localSearchPlugin(
const html = await render(file)
const sections =
// user provided generator
(await options.miniSearch?.splitIntoSections?.(file, html)) ??
(await options.miniSearch?._splitIntoSections?.(file, html)) ??
// default implementation
splitPageIntoSections(html)
// add sections to the locale index

@ -436,7 +436,7 @@ export namespace DefaultTheme {
* @param {string} path - absolute path to the markdown source file
* @param {string} html - document page rendered as html
*/
splitIntoSections?: (
_splitIntoSections?: (
path: string,
html: string
) =>

Loading…
Cancel
Save