File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,11 @@ let apicontent = '';
1818
1919// Identify files that should be skipped. As files are processed, they 
2020// are added to this list to prevent dupes. 
21- const  seen  =  { 
22-   'all.html' : true , 
23-   'index.html' : true 
24- } ; 
21+ const  seen  =  new  Set ( [ 'all.html' ,  'index.html' ] ) ; 
2522
2623for  ( const  link  of  toc . match ( / < a .* ?> / g) )  { 
2724  const  href  =  / h r e f = " ( .* ?) " / . exec ( link ) [ 1 ] ; 
28-   if  ( ! htmlFiles . includes ( href )  ||  seen [ href ] )  continue ; 
25+   if  ( ! htmlFiles . includes ( href )  ||  seen . has ( href ) )  continue ; 
2926  const  data  =  fs . readFileSync ( new  URL ( `./${ href }  ,  source ) ,  'utf8' ) ; 
3027
3128  // Split the doc. 
@@ -68,7 +65,7 @@ for (const link of toc.match(/<a.*?>/g)) {
6865    . trim ( )  +  '\n' ; 
6966
7067  // Mark source as seen. 
71-   seen [ href ]   =   true ; 
68+   seen . add ( href ) ; 
7269} 
7370
7471// Replace various mentions of index with all. 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments