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 {
175
175
jupyterCellSrcAsStr ,
176
176
} from "./jupyter-shared.ts" ;
177
177
import { error } from "../../deno_ral/log.ts" ;
178
+ import { valid } from "semver/mod.ts" ;
178
179
179
180
export const kQuartoMimeType = "quarto_mimetype" ;
180
181
export const kQuartoOutputOrder = "quarto_order" ;
@@ -922,12 +923,14 @@ export function jupyterCellWithOptions(
922
923
}
923
924
} ;
924
925
925
- const validMetadata : Record < string , string | number | boolean > = { } ;
926
+ const validMetadata : Record < string , string | number | boolean | null > = { } ;
926
927
for ( const key of Object . keys ( cell . metadata ) ) {
927
928
const value = cell . metadata [ key ] ;
928
929
let jsonEncodedKeyIndex = 0 ;
929
930
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" ) {
931
934
// https://github.com/quarto-dev/quarto-cli/issues/9089
932
935
// we need to json-encode this and signal the encoding in the key
933
936
// 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