'use client' export function getBlockMathExpression(raw: string) { const value = raw.trim() if (value.startsWith('\\[') && value.endsWith('\\]')) { return value.slice(2, -2).trim() } if (value.startsWith('$$') && value.endsWith('$$')) { return value.slice(2, -2).trim() } return value }