File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -923,14 +923,17 @@ export function jupyterCellWithOptions(
923
923
}
924
924
} ;
925
925
926
- const validMetadata : Record < string , string | number | boolean | null > = { } ;
926
+ const validMetadata : Record <
927
+ string ,
928
+ string | number | boolean | null | Array < unknown >
929
+ > = { } ;
927
930
for ( const key of Object . keys ( cell . metadata ) ) {
928
931
const value = cell . metadata [ key ] ;
929
932
let jsonEncodedKeyIndex = 0 ;
930
933
if ( value !== undefined ) {
931
934
if ( ! value && typeof value === "object" ) {
932
935
validMetadata [ key ] = null ;
933
- } else if ( value && typeof value === "object" ) {
936
+ } else if ( value && typeof value === "object" && ! Array . isArray ( value ) ) {
934
937
// https://github.com/quarto-dev/quarto-cli/issues/9089
935
938
// we need to json-encode this and signal the encoding in the key
936
939
// we can't use the key as is since it may contain invalid characters
@@ -944,7 +947,7 @@ export function jupyterCellWithOptions(
944
947
] = JSON . stringify ( { key, value } ) ;
945
948
} else if (
946
949
typeof value === "string" || typeof value === "number" ||
947
- typeof value === "boolean"
950
+ typeof value === "boolean" || Array . isArray ( value )
948
951
) {
949
952
validMetadata [ key ] = value ;
950
953
} else {
You can’t perform that action at this time.
0 commit comments