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.
1 parent 09a30b6 commit 895d220Copy full SHA for 895d220
packages/site-kit/src/lib/markdown/utils.ts
@@ -15,7 +15,7 @@ export const SHIKI_LANGUAGE_MAP = {
15
};
16
17
export function is_in_code_block(body: string, index: number) {
18
- const code_blocks = [...body.matchAll(/```.*\n(.|\n)+```/gm)].map((match) => {
+ const code_blocks = [...body.matchAll(/(`{3,}).*\n(.|\n)+?\1/gm)].map((match) => {
19
return [match.index ?? 0, match[0].length + (match.index ?? 0)] as const;
20
});
21
0 commit comments