File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed
Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -1148,21 +1148,12 @@ export async function runPandoc(
11481148 continue ;
11491149 }
11501150
1151- if (
1152- ( typeof pandocMetadata [ key ] === "object" &&
1153- typeof engineMetadata [ key ] === "object" ) ||
1154- ( Array . isArray ( pandocMetadata [ key ] ) &&
1155- Array . isArray ( engineMetadata [ key ] ) )
1156- ) {
1157- // Merge objects and arrays instead of replacing
1158- pandocMetadata [ key ] = mergeConfigs (
1159- pandocMetadata [ key ] ,
1160- engineMetadata [ key ] ,
1161- ) ;
1162- } else {
1163- // Replace values otherwise
1164- pandocMetadata [ key ] = engineMetadata [ key ] ;
1165- }
1151+ // to handle all possible objects correctly when merging,
1152+ // we call mergeConfigs on temporary objects so the structure
1153+ // matches what that function expects
1154+ const a = { content : pandocMetadata [ key ] } ;
1155+ const b = { content : engineMetadata [ key ] } ;
1156+ pandocMetadata [ key ] = mergeConfigs ( a , b ) . content ;
11661157 }
11671158 }
11681159
You can’t perform that action at this time.
0 commit comments