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(
923923 }
924924 } ;
925925
926- const validMetadata : Record < string , string | number | boolean | null > = { } ;
926+ const validMetadata : Record <
927+ string ,
928+ string | number | boolean | null | Array < unknown >
929+ > = { } ;
927930 for ( const key of Object . keys ( cell . metadata ) ) {
928931 const value = cell . metadata [ key ] ;
929932 let jsonEncodedKeyIndex = 0 ;
930933 if ( value !== undefined ) {
931934 if ( ! value && typeof value === "object" ) {
932935 validMetadata [ key ] = null ;
933- } else if ( value && typeof value === "object" ) {
936+ } else if ( value && typeof value === "object" && ! Array . isArray ( value ) ) {
934937 // https://github.com/quarto-dev/quarto-cli/issues/9089
935938 // we need to json-encode this and signal the encoding in the key
936939 // we can't use the key as is since it may contain invalid characters
@@ -944,7 +947,7 @@ export function jupyterCellWithOptions(
944947 ] = JSON . stringify ( { key, value } ) ;
945948 } else if (
946949 typeof value === "string" || typeof value === "number" ||
947- typeof value === "boolean"
950+ typeof value === "boolean" || Array . isArray ( value )
948951 ) {
949952 validMetadata [ key ] = value ;
950953 } else {
You can’t perform that action at this time.
0 commit comments