@mintlify/scraping 4.0.1185 → 4.0.1186

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/scraping",
3
- "version": "4.0.1185",
3
+ "version": "4.0.1186",
4
4
  "description": "Scrape documentation frameworks to Mintlify docs",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -87,5 +87,5 @@
87
87
  "optional": true
88
88
  }
89
89
  },
90
- "gitHead": "942f3d5baac187dc0f64ed7234d98201e6703353"
90
+ "gitHead": "56c5bd31977d73c877d2a8364d34f971020c3d46"
91
91
  }
@@ -377,14 +377,11 @@ class GoIndex {
377
377
 
378
378
  href(importPath: string, name: string | undefined, isPrivate: boolean): string | undefined {
379
379
  if (name) {
380
- const dot = name.indexOf('.');
381
- const location =
382
- this.symbols.get(`${importPath}#${name}`) ??
383
- (dot > 0 ? this.symbols.get(`${importPath}#${name.slice(0, dot)}`) : undefined);
380
+ const location = this.symbols.get(`${importPath}#${name}`);
384
381
  if (location) return `/${location.slug}${location.anchor ? `#${location.anchor}` : ''}`;
385
382
  }
386
383
  const packageSlug = this.packages.get(importPath);
387
- if (packageSlug) return `/${packageSlug}`;
384
+ if (packageSlug) return name ? undefined : `/${packageSlug}`;
388
385
  if (isPrivate) return undefined;
389
386
  return `https://pkg.go.dev/${encodeHref(importPath)}${name ? `#${encodeHref(name)}` : ''}`;
390
387
  }