Skip to content

Commit 74512f4

Browse files
committed
-
2 parents 49d69da + 27f8b71 commit 74512f4

File tree

8 files changed

+24892
-27282
lines changed

8 files changed

+24892
-27282
lines changed

baselines/dom.generated.d.ts

Lines changed: 1001 additions & 74 deletions
Large diffs are not rendered by default.

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

Lines changed: 1001 additions & 74 deletions
Large diffs are not rendered by default.

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

Lines changed: 1001 additions & 74 deletions
Large diffs are not rendered by default.

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

Lines changed: 1001 additions & 74 deletions
Large diffs are not rendered by default.

inputfiles/mdn.json

Lines changed: 20832 additions & 26932 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 48 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/fetch-mdn.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ const data = await res.json();
1414
// Filter and map the data
1515
const filtered = Object.values(data)
1616
.filter((entry) => {
17-
const path = entry.mdn_url.toLowerCase();
17+
const path = entry.mdn_url;
1818
return (
19-
path.startsWith("/en-us/docs/web/api/") ||
19+
path.startsWith("/en-US/docs/Web/API/") ||
2020
path.startsWith(
21-
"/en-us/docs/webassembly/reference/javascript_interface/",
21+
"/en-US/docs/WebAssembly/Reference/JavaScript_interface/",
2222
) ||
23-
path.startsWith("/en-us/docs/web/css/reference/properties/")
23+
path.startsWith("Web/CSS/Reference/Properties/")
2424
);
2525
})
2626
.map(({ mdn_url, pageType, summary }) => ({

src/build/mdn-comments.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const inputFile = new URL("../../inputfiles/mdn.json", import.meta.url);
55

66
// Valid subdirectories for our use case
77
const subdirectories = [
8-
"web/api/",
9-
"webassembly/reference/javascript_interface/",
10-
"web/css/reference/properties/",
8+
"Web/API/",
9+
"WebAssembly/Reference/JavaScript_interface/",
10+
"Web/CSS/Reference/Properties/",
1111
];
1212

1313
const paths: Record<string, string[]> = {
@@ -28,7 +28,7 @@ const paths: Record<string, string[]> = {
2828

2929
function extractSlug(mdnUrl: string): string[] {
3030
for (const subdirectory of subdirectories) {
31-
if (!mdnUrl.toLowerCase().startsWith(subdirectory)) {
31+
if (!mdnUrl.startsWith(subdirectory)) {
3232
continue;
3333
}
3434
return mdnUrl

0 commit comments

Comments
 (0)