@@ -8,13 +8,9 @@ import { select } from "hast-util-select";
88import { toString } from "hast-util-to-string" ;
99import lunr from "lunr" ;
1010import mcpDocs from "../../build/mcp/docs.json" with { type : "json" } ;
11- import mcpSearchIndexData from "../../build/mcp/search-index.json" with {
12- type : "json" ,
13- } ;
11+ import mcpSearchIndexData from "../../build/mcp/search-index.json" with { type : "json" } ;
1412import mcpManifest from "../../build/mcp/manifest.json" with { type : "json" } ;
15- import siteSearchIndexData from "../../build/search-index.json" with {
16- type : "json" ,
17- } ;
13+ import siteSearchIndexData from "../../build/search-index.json" with { type : "json" } ;
1814
1915const CONTENT_SELECTORS = [ "article" , "main" , ".main-wrapper" , '[role="main"]' ] ;
2016
@@ -74,7 +70,11 @@ function makeTitle(doc) {
7470}
7571
7672function makeSnippet ( doc ) {
77- if ( typeof doc . t === "string" && typeof doc . s === "string" && doc . s !== doc . t ) {
73+ if (
74+ typeof doc . t === "string" &&
75+ typeof doc . s === "string" &&
76+ doc . s !== doc . t
77+ ) {
7878 return doc . t ;
7979 }
8080 if ( typeof doc . t === "string" && doc . t . trim ( ) ) return doc . t ;
@@ -179,7 +179,8 @@ function normalizeToolUrl(value, docsBaseUrl) {
179179 const parsed = new URL ( value ) ;
180180 const docsBase = new URL ( docsBaseUrl ) ;
181181 const isDocsBase =
182- parsed . origin === docsBase . origin && parsed . pathname === docsBase . pathname ;
182+ parsed . origin === docsBase . origin &&
183+ parsed . pathname === docsBase . pathname ;
183184
184185 if ( ! isDocsBase && parsed . pathname . length > 1 ) {
185186 parsed . pathname = parsed . pathname . replace ( / \/ + $ / , "" ) ;
0 commit comments