Skip to content

Commit 26b2047

Browse files
committed
fix: improve title extraction by removing trailing 'extension'
1 parent 65213fe commit 26b2047

9 files changed

+1363
-273
lines changed

baselines/dom.generated.d.ts

+170-34
Large diffs are not rendered by default.

baselines/serviceworker.generated.d.ts

+170-34
Large diffs are not rendered by default.

baselines/sharedworker.generated.d.ts

+170-34
Large diffs are not rendered by default.

baselines/ts5.5/dom.generated.d.ts

+170-34
Large diffs are not rendered by default.

baselines/ts5.5/serviceworker.generated.d.ts

+170-34
Large diffs are not rendered by default.

baselines/ts5.5/sharedworker.generated.d.ts

+170-34
Large diffs are not rendered by default.

baselines/ts5.5/webworker.generated.d.ts

+170-34
Large diffs are not rendered by default.

baselines/webworker.generated.d.ts

+170-34
Large diffs are not rendered by default.

src/generateDescriptions.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ async function getIndexMdContents(
5858

5959
// Improved title extraction
6060
const titleMatch = content.match(/title:\s*["']?([^"'\n]+)["']?/);
61-
const title = titleMatch ? titleMatch[1] : path.basename(folder);
61+
const title = titleMatch
62+
? titleMatch[1].replace(/ extension$/, "")
63+
: path.basename(folder);
6264

6365
const summary = extractSummary(content);
6466
results[title] = summary;

0 commit comments

Comments
 (0)