Repository navigation
fix(literature): 修复 arXiv 单文件 TeX 返回空全文 - #274
Merged
Merged
Conversation
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #266
arXiv 的部分旧论文返回 gzip 压缩的单个 TeX 文档。此前按 tar 解析后得到空文件列表,全文接口却返回成功,阻断了 HTML/PDF 回退。现在识别常见 TeX/AMS-TeX 头并保留为
main.tex;空文本、不可识别或损坏的归档统一返回提取失败,沿用现有回退顺序。正常 tar、路径过滤和输出长度限制保持原有行为。验证:在已发布的 0.1.5 上用合成 gzip TeX 稳定复现空结果;修复后保留完整原文。类型检查、构建、19 个测试文件共 256 项测试通过;开发依赖和 DSH 0.2.2-rc.1 的工具/后台任务/取消探针均通过。覆盖单文件 TeX、正常 tar、空包、无文本文件、损坏包及 HTML/PDF 回退;未把合成测试当作真实 arXiv 在线验收。
本 PR 只修改文献包源码,后续发布新 npm 版本并更新产品精确锁后才会进入客户端。