From 728b252f6d8d9f18c452c83f5c1eae8141429aab Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Wed, 20 Nov 2024 10:42:57 +0000 Subject: [PATCH] fix: set default for enumerated --- packages/myst-ext-exercise/src/exercise.ts | 2 +- packages/myst-ext-proof/src/proof.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/myst-ext-exercise/src/exercise.ts b/packages/myst-ext-exercise/src/exercise.ts index c89f32383..9fc1a4276 100644 --- a/packages/myst-ext-exercise/src/exercise.ts +++ b/packages/myst-ext-exercise/src/exercise.ts @@ -38,7 +38,7 @@ export const exerciseDirective: DirectiveSpec = { if (data.options?.nonumber !== undefined) { enumerated = !data.options.nonumber as boolean; } else { - enumerated = data.options?.enumerated as boolean; + enumerated = (data.options?.enumerated as boolean) ?? true; } const exercise: GenericNode = { type: 'exercise', diff --git a/packages/myst-ext-proof/src/proof.ts b/packages/myst-ext-proof/src/proof.ts index 11e80ce8a..7458acb1a 100644 --- a/packages/myst-ext-proof/src/proof.ts +++ b/packages/myst-ext-proof/src/proof.ts @@ -51,7 +51,7 @@ export const proofDirective: DirectiveSpec = { if (data.options?.nonumber !== undefined) { enumerated = !data.options.nonumber as boolean; } else { - enumerated = data.options?.enumerated as boolean; + enumerated = (data.options?.enumerated as boolean) ?? true; } const proof = { type: 'proof',