remove glob and cheerio from dependencies

This commit is contained in:
Rich Harris
2018-08-19 15:20:14 -04:00
parent 14e5c8e761
commit dba83641e4
23 changed files with 1471 additions and 1317 deletions

View File

@@ -0,0 +1,7 @@
export default function clean_html(html: string) {
return html
.replace(/<!\[CDATA\[[\s\S]*?\]\]>/gm, '')
.replace(/(<script[\s\S]*?>)[\s\S]*?<\/script>/gm, '$1</' + 'script>')
.replace(/(<style[\s\S]*?>)[\s\S]*?<\/style>/gm, '$1</' + 'style>')
.replace(/<!--[\s\S]*?-->/gm, '');
}