mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-22 15:15:19 +00:00
decode req.path during export
This commit is contained in:
@@ -85,7 +85,7 @@ async function execute(emitter: EventEmitter, opts: Opts) {
|
|||||||
|
|
||||||
function save(path: string, status: number, type: string, body: string) {
|
function save(path: string, status: number, type: string, body: string) {
|
||||||
const { pathname } = resolve(origin, path);
|
const { pathname } = resolve(origin, path);
|
||||||
let file = pathname.slice(1);
|
let file = decodeURIComponent(pathname.slice(1));
|
||||||
|
|
||||||
if (saved.has(file)) return;
|
if (saved.has(file)) return;
|
||||||
saved.add(file);
|
saved.add(file);
|
||||||
|
|||||||
@@ -106,6 +106,14 @@ const posts = [
|
|||||||
<p>If you didn't have adult onset diabetes, I wouldn't mind giving you a little sugar. Everybody dance NOW. And the soup of the day is bread. Great, now I'm gonna smell to high heaven like a tuna melt!</p>
|
<p>If you didn't have adult onset diabetes, I wouldn't mind giving you a little sugar. Everybody dance NOW. And the soup of the day is bread. Great, now I'm gonna smell to high heaven like a tuna melt!</p>
|
||||||
<p>That's how Tony Wonder lost a nut. She calls it a Mayonegg. Go ahead, touch the Cornballer. There's a new daddy in town. A discipline daddy.</p>
|
<p>That's how Tony Wonder lost a nut. She calls it a Mayonegg. Go ahead, touch the Cornballer. There's a new daddy in town. A discipline daddy.</p>
|
||||||
`
|
`
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: 'Encödïng test',
|
||||||
|
slug: 'encödïng-test',
|
||||||
|
html: `
|
||||||
|
<p>It works</p>
|
||||||
|
`
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ function testExport({ basepath = '' }) {
|
|||||||
'blog/how-to-use-sapper/index.html',
|
'blog/how-to-use-sapper/index.html',
|
||||||
'blog/what-is-sapper/index.html',
|
'blog/what-is-sapper/index.html',
|
||||||
'blog/why-the-name/index.html',
|
'blog/why-the-name/index.html',
|
||||||
|
'blog/encödïng-test/index.html',
|
||||||
|
|
||||||
'blog.json',
|
'blog.json',
|
||||||
'blog/a-very-long-post.json',
|
'blog/a-very-long-post.json',
|
||||||
@@ -101,6 +102,7 @@ function testExport({ basepath = '' }) {
|
|||||||
'blog/how-to-use-sapper.json',
|
'blog/how-to-use-sapper.json',
|
||||||
'blog/what-is-sapper.json',
|
'blog/what-is-sapper.json',
|
||||||
'blog/why-the-name.json',
|
'blog/why-the-name.json',
|
||||||
|
'blog/encödïng-test.json',
|
||||||
|
|
||||||
'favicon.png',
|
'favicon.png',
|
||||||
'global.css',
|
'global.css',
|
||||||
|
|||||||
Reference in New Issue
Block a user