mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	chore(docs): improve xmldoc inline code parsing (#5480)
This commit is contained in:
		
							parent
							
								
									cc749fe679
								
							
						
					
					
						commit
						8f3a6c6b45
					
				| @ -103,7 +103,12 @@ function _wrapAndEscape(node, maxColumns = 0) { | |||||||
|     lines.push(text); |     lines.push(text); | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   const text = node.text.replace(/[^\[]`([^\]]*[^\[])`[^\]]/g, (m, g1) => ` <c>${g1}</c> `); | 
 | ||||||
|  |   let text = node.text; | ||||||
|  |   text = text.replace(/`([^`]*)`/g, (match, code) => `<c>${code.replace('<', '<').replace('>', '>')}</c>`); | ||||||
|  |   text = text.replace(/\[(.*?)\]\((.*?\))/g, (match, linkName, linkUrl) => {  | ||||||
|  |     return `<a href="${linkUrl}">${linkName}</a>`; | ||||||
|  |   }); | ||||||
|   const words = text.split(' '); |   const words = text.split(' '); | ||||||
|   let line = ''; |   let line = ''; | ||||||
|   for (let i = 0; i < words.length; i++) { |   for (let i = 0; i < words.length; i++) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Anže Vodovnik
						Anže Vodovnik