import { isMarkdownLineStart } from '@admin/utils/editor/is-markdown-line-start' export function matchCodeFenceStart(markdown: string, index: number): number | null { if (!isMarkdownLineStart(markdown, index)) return null const match = /^```[^\n]*(?:\n|$)/.exec(markdown.slice(index)) return match ? index + match[0].length : null }