fix(reports): strip chart fences across newline styles

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
jesse-ux
2026-09-24 18:27:14 +08:00
co-authored by Claude Code
parent 5ec29eb736
commit fa8fef559b
7 changed files with 70 additions and 8 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ const SIGN_NUMBER: Record<string, number> = {
双鱼座: 12,
};
const FENCE_RE = /(?:\n[ \t]*)?```jyotish-chart\n[\s\S]*?```(?:\n[ \t]*)?/g;
const FENCE_RE = /(?:\r?\n[ \t]*)?```jyotish-chart\r?\n[\s\S]*?```(?:\r?\n[ \t]*)?/g;
export const reportChartBlockSchema = z.strictObject({
version: z.literal(1),