search.js: give pathSplitter a type signature
This commit is contained in:
@@ -2740,7 +2740,11 @@ class DocSearch {
|
|||||||
return [displayPath, href, `${exactPath}::${name}`];
|
return [displayPath, href, `${exactPath}::${name}`];
|
||||||
};
|
};
|
||||||
|
|
||||||
// @ts-expect-error
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} path
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
function pathSplitter(path) {
|
function pathSplitter(path) {
|
||||||
const tmp = "<span>" + path.replace(/::/g, "::</span><span>");
|
const tmp = "<span>" + path.replace(/::/g, "::</span><span>");
|
||||||
if (tmp.endsWith("<span>")) {
|
if (tmp.endsWith("<span>")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user