Skip to content

Commit f449210

Browse files
authored
Update src/build/mdn-comments.ts
1 parent 3a2afba commit f449210

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/build/mdn-comments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function generatePath(content: string): string[] | undefined {
8484
}
8585

8686
function extractSlug(content: string): string[] {
87-
const match = content.match(/slug:\s*["']?([^"'\n]+)["']?/)!;
87+
const match = content.match(/\nslug: (.+)\n/)!;
8888
const url = match[1].split(":").pop()!;
8989
const normalized = url.endsWith("_static") ? url.slice(0, -7) : url;
9090
const parts = normalized.split("/").slice(2); // skip `/en-US/web/api/...`

0 commit comments

Comments
 (0)