We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8673704 commit c4062baCopy full SHA for c4062ba
src/build/mdn-comments.ts
@@ -89,7 +89,8 @@ function generateTypes(content: string): string[] | undefined {
89
function generateSlug(content: string): string[] {
90
const match = content.match(/slug:\s*["']?([^"'\n]+)["']?/)!;
91
const url = match[1].split(":").pop()!;
92
- const parts = url.split("/").slice(2); // skip `/en-US/web/api/...`
+ const normalized = url.endsWith("_static") ? url.slice(0, -7) : url;
93
+ const parts = normalized.split("/").slice(2); // skip `/en-US/web/api/...`
94
return parts; // Keep only top-level and method
95
}
96
0 commit comments