kopia lustrzana https://github.com/cheeaun/phanpy
				
				
				
			Fix text nodes extraction fails on template element
							rodzic
							
								
									4d03f8fba4
								
							
						
					
					
						commit
						82163c0b88
					
				|  | @ -30,9 +30,15 @@ const TWITTER_MENTION_REGEX = /@[a-zA-Z0-9_]+@(twitter|x)\.com/; | |||
| const TWITTER_MENTION_CAPTURE_REGEX = /(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g; | ||||
| 
 | ||||
| function createDOM(html, isDocumentFragment) { | ||||
|   if (isDocumentFragment) { | ||||
|     const tpl = document.createElement('template'); | ||||
|     tpl.innerHTML = html; | ||||
|   return isDocumentFragment ? tpl.content : tpl; | ||||
|     return tpl.content; | ||||
|   } else { | ||||
|     const tpl = document.createElement('div'); | ||||
|     tpl.innerHTML = html; | ||||
|     return tpl; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| function _enhanceContent(content, opts = {}) { | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Lim Chee Aun
						Lim Chee Aun