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 3a2afba commit f449210Copy full SHA for f449210
src/build/mdn-comments.ts
@@ -84,7 +84,7 @@ function generatePath(content: string): string[] | undefined {
84
}
85
86
function extractSlug(content: string): string[] {
87
- const match = content.match(/slug:\s*["']?([^"'\n]+)["']?/)!;
+ const match = content.match(/\nslug: (.+)\n/)!;
88
const url = match[1].split(":").pop()!;
89
const normalized = url.endsWith("_static") ? url.slice(0, -7) : url;
90
const parts = normalized.split("/").slice(2); // skip `/en-US/web/api/...`
0 commit comments