Module 'parse5' as import syntax (#4015)
This commit is contained in:
		
							parent
							
								
									341838b502
								
							
						
					
					
						commit
						723d5baed5
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,10 +1,10 @@
 | 
			
		|||
const parse5 = require('parse5');
 | 
			
		||||
import { parseFragment, DefaultTreeDocumentFragment } from 'parse5';
 | 
			
		||||
import { URL } from 'url';
 | 
			
		||||
 | 
			
		||||
export function fromHtml(html: string): string {
 | 
			
		||||
	if (html == null) return null;
 | 
			
		||||
 | 
			
		||||
	const dom = parse5.parseFragment(html);
 | 
			
		||||
	const dom = parseFragment(html) as DefaultTreeDocumentFragment;
 | 
			
		||||
 | 
			
		||||
	let text = '';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue