Skip to content

Commit

Permalink
fix: πŸ› remark transform error when no code block lang
Browse files Browse the repository at this point in the history
βœ… Closes: #1640
  • Loading branch information
Saul-Mirone committed Jan 24, 2025
1 parent ad2a8fd commit b333a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/crepe/src/feature/latex/block-latex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b333a4c

Please sign in to comment.