Skip to content

Commit 3877aad

Browse files
committed
rename
1 parent 3e8433e commit 3877aad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/build/mdn-comments.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function generatePath(content: string): string[] | undefined {
8686
return plural;
8787
}
8888

89-
function generateSlug(content: string): string[] {
89+
function extractSlug(content: string): string[] {
9090
const match = content.match(/slug:\s*["']?([^"'\n]+)["']?/)!;
9191
const url = match[1].split(":").pop()!;
9292
const normalized = url.endsWith("_static") ? url.slice(0, -7) : url;
@@ -135,7 +135,7 @@ export async function generateDescriptions(): Promise<{
135135
await Promise.all(
136136
indexPaths.map(async (fileURL) => {
137137
const content = await fs.readFile(fileURL, "utf-8");
138-
const slug = generateSlug(content);
138+
const slug = extractSlug(content);
139139
const generatedPatch = generatePath(content);
140140
if (!slug || slug.length === 0 || !generatedPatch) return;
141141

0 commit comments

Comments
 (0)