File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ import {
175175 jupyterCellSrcAsStr ,
176176} from "./jupyter-shared.ts" ;
177177import { error } from "../../deno_ral/log.ts" ;
178+ import { valid } from "semver/mod.ts" ;
178179
179180export const kQuartoMimeType = "quarto_mimetype" ;
180181export const kQuartoOutputOrder = "quarto_order" ;
@@ -922,12 +923,14 @@ export function jupyterCellWithOptions(
922923 }
923924 } ;
924925
925- const validMetadata : Record < string , string | number | boolean > = { } ;
926+ const validMetadata : Record < string , string | number | boolean | null > = { } ;
926927 for ( const key of Object . keys ( cell . metadata ) ) {
927928 const value = cell . metadata [ key ] ;
928929 let jsonEncodedKeyIndex = 0 ;
929930 if ( value !== undefined ) {
930- if ( value && typeof value === "object" ) {
931+ if ( ! value && typeof value === "object" ) {
932+ validMetadata [ key ] = null ;
933+ } else if ( value && typeof value === "object" ) {
931934 // https://github.com/quarto-dev/quarto-cli/issues/9089
932935 // we need to json-encode this and signal the encoding in the key
933936 // we can't use the key as is since it may contain invalid characters
You can’t perform that action at this time.
0 commit comments