|
|
@ -94,8 +94,8 @@ export default async function preprocess(
|
|
|
|
for (const fn of script) {
|
|
|
|
for (const fn of script) {
|
|
|
|
source = await replace_async(
|
|
|
|
source = await replace_async(
|
|
|
|
source,
|
|
|
|
source,
|
|
|
|
/<!--[^]*?-->|<script(\s[^]*?)?>([^]*?)<\/script>/gi,
|
|
|
|
/<!--[^]*?-->|<script(\s[^]*?)?(?:>([^]*?)<\/script>|\/>)/gi,
|
|
|
|
async (match, attributes = '', content) => {
|
|
|
|
async (match, attributes = '', content = '') => {
|
|
|
|
if (!attributes && !content) {
|
|
|
|
if (!attributes && !content) {
|
|
|
|
return match;
|
|
|
|
return match;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -114,8 +114,8 @@ export default async function preprocess(
|
|
|
|
for (const fn of style) {
|
|
|
|
for (const fn of style) {
|
|
|
|
source = await replace_async(
|
|
|
|
source = await replace_async(
|
|
|
|
source,
|
|
|
|
source,
|
|
|
|
/<!--[^]*?-->|<style(\s[^]*?)?>([^]*?)<\/style>/gi,
|
|
|
|
/<!--[^]*?-->|<style(\s[^]*?)?(?:>([^]*?)<\/style>|\/>)/gi,
|
|
|
|
async (match, attributes = '', content) => {
|
|
|
|
async (match, attributes = '', content = '') => {
|
|
|
|
if (!attributes && !content) {
|
|
|
|
if (!attributes && !content) {
|
|
|
|
return match;
|
|
|
|
return match;
|
|
|
|
}
|
|
|
|
}
|
|
|
|