The disambiguation needs to be done earlier so that the auto-link-code post-processor can benefit from it. PR Close #22494
		
			
				
	
	
		
			13 lines
		
	
	
		
			387 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			387 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| module.exports = function disambiguateByModule() {
 | |
|   return (alias, originatingDoc, docs) => {
 | |
|     const originatingModule = originatingDoc && originatingDoc.moduleDoc;
 | |
|     if (originatingModule) {
 | |
|       const filteredDocs = docs.filter(doc => doc.moduleDoc === originatingModule);
 | |
|       if (filteredDocs.length > 0) {
 | |
|         return filteredDocs;
 | |
|       }
 | |
|     }
 | |
|     return docs;
 | |
|   };
 | |
| };
 |