We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
twoslash
1 parent 90ca617 commit 78a812bCopy full SHA for 78a812b
packages/slidev/node/syntax/transform/code-wrapper.ts
@@ -2,7 +2,7 @@ import type { MarkdownTransformContext } from '@slidev/types'
2
import { normalizeRangeStr } from './utils'
3
4
// eslint-disable-next-line regexp/no-super-linear-backtracking
5
-export const reCodeBlock = /^```([\w'-]+)?\s*(?:\[(.*?)\])?\s*(?:\{([\w*,|-]+)\}\s*?(\{[^}]*\})?([^\r\n]*))?\r?\n([ \t]*\S[\s\S]*?)^```$/gm
+export const reCodeBlock = /^```([\w'-]+)?\s*(?:\[(.*?)\])?\s*(?:\{([\w*,|-]+)\}\s*?(\{[^}]*\})?([^\r\n]*))?\r?\n((?:(?!^```)[\s\S])*?)^```$/gm
6
7
/**
8
* Transform code block with wrapper
0 commit comments