Skip to content

红色像素误判 KaTeX 错误 - #2

Open
liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/dom-render-error-detection
Open

liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/dom-render-error-detection

Conversation

@liumaker

@liumaker liumaker commented Sep 8, 2026

Copy link
Copy Markdown

旧逻辑会通过红色像素导致误判 KaTeX 错误。
修改前,合法红色公式可能被判为失败;修改后,只有 KaTeX/DOM 明确错误或截图链路异常才失败,并可返回具体错误文本。

@Soul-Code Soul-Code left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提交组织问题:当前 #2 → #3 → #4 → #5 → #6 → #8 → #7 是一条累计提交链,但全部以 main 为 base,导致后一个 PR 包含前面全部修改,标题与实际审核范围不一致。请调整为独立 PR 或正确的 stacked PR;每个问题都应增加能够证明“main 失败、当前独立修改后通过”的最小回归测试。

已在 main 复现:合法红色公式会被 _has_katex_error() 误判;修改后正常红色公式通过,非法 KaTeX 仍能通过 DOM 状态识别。修复方向正确。

请增加两个回归测试:合法红色内容不得标记为错误;非法 KaTeX 必须返回 katex_error。补齐测试并拆清提交范围后可以接受。

@liumaker
liumaker force-pushed the fix/dom-render-error-detection branch from 91d170c to 467cb86 Compare September 10, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants