Skip to content

着色破坏结构命令及其参数 - #5

Open
liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/tokenizer-output-validation
Open

liumaker wants to merge 2 commits into
SoMarkAI:mainfrom
liumaker:fix/tokenizer-output-validation

Conversation

@liumaker

@liumaker liumaker commented Sep 8, 2026

Copy link
Copy Markdown

fastcdm的隐式乘法规则可能在完整 LaTeX 命令内部命中较短前缀,例如破坏 \ddots、\cdots 和 \int。
修改前 tokenizer 的损坏输出可能被当作正常公式继续处理;修改后完整命令保持稳定,执行或输出异常会立即成为明确的预处理失败。

@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 的 tokenizer 会错误改写:\ddots → \ddot{s}、\cdots → \cdot s、\int → \in t。当前修改能够修复这些问题,核心正则调整应保留。

但本 PR 同时把 tokenize() 的失败契约从返回 (False, source) 改成抛出 CDMPreprocessingError,还新增了显式 \limits 输出;后者会导致当前着色流程渲染失败,必须依赖 #6 才能恢复。

请拆分“命令前缀修复”“错误契约修改”和“limits 规范化”,说明 API 兼容策略并补充回归测试。

@liumaker
liumaker force-pushed the fix/tokenizer-output-validation branch from 4424349 to f60a218 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