Some more work
This commit is contained in:
parent
cebad76cad
commit
141149e794
2 changed files with 10522 additions and 271 deletions
|
@ -125,9 +125,14 @@ export function createComponent(cb: AstroComponentFactory) {
|
|||
return cb;
|
||||
}
|
||||
|
||||
export async function renderSlot(_result: any, slotted: string, fallback?: any) {
|
||||
export async function renderSlot(_result: any, slotted: string, fallback?: any): Promise<string> {
|
||||
if (slotted) {
|
||||
return _render(slotted);
|
||||
let iterator = _render(slotted);
|
||||
let content = '';
|
||||
for await(const chunk of iterator) {
|
||||
content += chunk;
|
||||
}
|
||||
return markHTMLString(content);
|
||||
}
|
||||
return fallback;
|
||||
}
|
||||
|
|
10784
pnpm-lock.yaml
10784
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue