Skip to content

Commit 8673704

Browse files
committed
update logic
1 parent 734c5e0 commit 8673704

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/build/mdn-comments.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ const paths: Record<string, string[]> = {
7979

8080
function generateTypes(content: string): string[] | undefined {
8181
const pageType = content.match(/page-type:\s*["']?([^"'\n]+)["']?/)!;
82-
const type = pageType[1].split("-").pop()!;
83-
const plural = types[type];
82+
const type = pageType[1];
83+
const plural = paths[type];
8484
if (!plural) return;
8585

86-
return [plural, type];
86+
return plural;
8787
}
8888

8989
function generateSlug(content: string): string[] {

0 commit comments

Comments
 (0)