File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ const data = await res.json();
1414// Filter and map the data
1515const 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 /" ) ||
20- path . startsWith ( "/en-us /docs/webassembly/reference/javascript_interface /" )
19+ path . startsWith ( "/en-US /docs/Web/API /" ) ||
20+ path . startsWith ( "/en-US /docs/WebAssembly/Reference/JavaScript_interface /" )
2121 ) ;
2222 } )
2323 . map ( ( { mdn_url, pageType, summary } ) => ( {
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ const inputFile = new URL("../../inputfiles/mdn.json", import.meta.url);
44
55// Valid subdirectories for our use case
66const subdirectories = [
7- "web/api /" ,
8- "webassembly/reference/javascript_interface /" ,
7+ "Web/API /" ,
8+ "WebAssembly/Reference/JavaScript_interface /" ,
99] ;
1010
1111const paths : Record < string , string [ ] > = {
@@ -24,7 +24,7 @@ const paths: Record<string, string[]> = {
2424
2525function extractSlug ( mdnUrl : string ) : string [ ] {
2626 for ( const subdirectory of subdirectories ) {
27- if ( ! mdnUrl . toLowerCase ( ) . startsWith ( subdirectory ) ) {
27+ if ( ! mdnUrl . startsWith ( subdirectory ) ) {
2828 continue ;
2929 }
3030 return mdnUrl
You can’t perform that action at this time.
0 commit comments