diff --git a/packages/crepe/src/feature/latex/block-latex.ts b/packages/crepe/src/feature/latex/block-latex.ts index 24686cf7a79..3c00c57263f 100644 --- a/packages/crepe/src/feature/latex/block-latex.ts +++ b/packages/crepe/src/feature/latex/block-latex.ts @@ -8,7 +8,7 @@ export const blockLatexSchema = codeBlockSchema.extendSchema((prev) => { toMarkdown: { match: baseSchema.toMarkdown.match, runner: (state, node) => { - const language = node.attrs.language + const language = node.attrs.language ?? '' if (language.toLowerCase() === 'latex') { state.addNode( 'math',