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 ce0740c commit 9421faeCopy full SHA for 9421fae
src/build/mdn-comments.ts
@@ -22,12 +22,12 @@ const paths: Record<string, string[]> = {
22
"webassembly-static-method": ["methods", "method"],
23
};
24
25
-function extractSlug(slug: string): string[] {
+function extractSlug(mdnUrl: string): string[] {
26
for (const subdirectory of subdirectories) {
27
- if (!slug.toLowerCase().startsWith(subdirectory)) {
+ if (!mdnUrl.toLowerCase().startsWith(subdirectory)) {
28
continue;
29
}
30
- return slug
+ return mdnUrl
31
.slice(subdirectory.length)
32
.replace(/_static/g, "")
33
.split("/");
0 commit comments