Skip to content

Commit 895d220

Browse files
committed
fix headings
1 parent 09a30b6 commit 895d220

File tree

1 file changed

+1
-1
lines changed
  • packages/site-kit/src/lib/markdown

1 file changed

+1
-1
lines changed

packages/site-kit/src/lib/markdown/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const SHIKI_LANGUAGE_MAP = {
1515
};
1616

1717
export function is_in_code_block(body: string, index: number) {
18-
const code_blocks = [...body.matchAll(/```.*\n(.|\n)+```/gm)].map((match) => {
18+
const code_blocks = [...body.matchAll(/(`{3,}).*\n(.|\n)+?\1/gm)].map((match) => {
1919
return [match.index ?? 0, match[0].length + (match.index ?? 0)] as const;
2020
});
2121

0 commit comments

Comments
 (0)