diff --git a/src/api/export.ts b/src/api/export.ts index e3331eb28..fda9bae04 100644 --- a/src/api/export.ts +++ b/src/api/export.ts @@ -241,14 +241,14 @@ async function _export({ const base = resolve(url.href, base_href); let match; - const pattern = /<(a|img|source)\s+([\s\S]+?)>/gm; + const pattern = /<(a|img|link|source)\s+([\s\S]+?)>/gm; while (match = pattern.exec(cleaned)) { let hrefs: string[] = []; const element = match[1]; const attrs = match[2]; - if (element === 'a') { + if (element === 'a' || element === 'link') { hrefs.push(get_href(attrs)); } else { if (element === 'img') { diff --git a/test/apps/export/src/routes/index.svelte b/test/apps/export/src/routes/index.svelte index 457298ad7..34564acf1 100644 --- a/test/apps/export/src/routes/index.svelte +++ b/test/apps/export/src/routes/index.svelte @@ -1,3 +1,7 @@ + + + +

Great success!

blog diff --git a/test/apps/export/src/routes/manifest.json.js b/test/apps/export/src/routes/manifest.json.js new file mode 100644 index 000000000..84d8038e6 --- /dev/null +++ b/test/apps/export/src/routes/manifest.json.js @@ -0,0 +1,4 @@ +export function get(req, res) { + res.writeHead(200, { 'Content-Type': 'application/json' }); + res.end('{}'); +} diff --git a/test/apps/export/test.ts b/test/apps/export/test.ts index 948d52e9c..2f6aca3f0 100644 --- a/test/apps/export/test.ts +++ b/test/apps/export/test.ts @@ -45,6 +45,7 @@ describe('export', function() { 'img/example-192.png', 'img/example-512.png', 'pdfs/test.pdf', + 'manifest.json', ...boom ].sort()); });