fix(demo): _FRAGMENT

This commit is contained in:
purocean
2021-12-01 10:44:48 +08:00
parent efda594571
commit ea7972bbfa
+9
View File
@@ -69,6 +69,15 @@ if (FLAG_DEMO) {
if (method === 'POST') {
return Promise.resolve({ status: 'ok', message: 'success' })
} else if (method === 'GET') {
if ((url.searchParams.get('path') || '').includes('_FRAGMENT.md')) {
const content = "---\ncustomVarFromOtherDoc: Hello, It's Me.\n---\n*Content from a fragment.*"
return Promise.resolve({
status: 'ok',
message: 'success',
data: { content, hash: 'test' }
})
}
if ((url.searchParams.get('path') || '').endsWith('.luckysheet')) {
const content = JSON.stringify([{
name: 'Sheet1',