Skip to content

Commit bca2d32

Browse files
committed
use also safeCloneDeep when merging executed files
for epub book output for example.
1 parent c1805c3 commit bca2d32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/project/types/book/book-render.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ import { resourcePath } from "../../../core/resources.ts";
9292
import { PandocAttr, PartitionedMarkdown } from "../../../core/pandoc/types.ts";
9393
import { stringify } from "../../../core/yaml.ts";
9494
import { waitUntilNamedLifetime } from "../../../core/lifetimes.ts";
95+
import { safeCloneDeep } from "../../../core/safe-clone-deep.ts";
9596

9697
export function bookPandocRenderer(
9798
options: RenderOptions,
@@ -381,7 +382,7 @@ async function mergeExecutedFiles(
381382
files: ExecutedFile[],
382383
): Promise<ExecutedFile> {
383384
// base context on the first file (which has to be index.md in the root)
384-
const context = ld.cloneDeep(files[0].context) as RenderContext;
385+
const context = safeCloneDeep(files[0].context);
385386

386387
// use global render options
387388
context.options = removePandocTo(options);

0 commit comments

Comments
 (0)