Repository navigation
feat(local-files): 保存并阅读已有 HTML 与 Markdown 结构 - #6
Merged
Merged
Conversation
- 从已有 DOM 和嵌入正文保留对象、代码、表格与资源引用 - 成功对账原位升级 file.v2,失败和原件缺失保留旧成功正文 - 在既有阅读 View 隔离 HTML/GFM 并保留普通文本原文
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.
本地 HTML 原先被降为纯文,Markdown 也只能按普通文本阅读。现在 HTML 提取保留已有对象、代码、表格、链接及媒体引用,读取明确的嵌入正文;Markdown 保留原文并按 GFM 阅读。空应用壳返回提取失败。
沿既有目录对账与单文件事务保存
file.v2:成功时复用根、正文与关系身份,失败及原件缺失保留旧正文、版本和成功修订。新 extractor 标识使原件字节未变时也能重新提取。没有新数据库、迁移服务、网络采集或 Organization 方法。HTML/Markdown 在既有文件 View 内使用禁脚本的 WKWebView;净化及 CSP 阻止自动资源加载,媒体与字幕保留链接,媒体中的文字稿仍保留。新增依赖固定版本与完整许可证进入既有打包流程;Hister 的借鉴说明留在分发声明。
验证:
bash scripts/check.sh:66 项通过;环境门控的数据库用例在独立运行中检查。bash scripts/build-app.sh:通用 app/DMG 构建通过,未启动前台应用。共享合同:docs#48。须先交付 v2 读端再启用新写端;一旦已有新格式资料,回退写端不应同时移除读端。此 PR 未发布、合并或迁移任何共享库。
跨仓库状态和阅读截图的证据索引由 impl-py#165 统一跟踪。UI 依赖为 ui#75,TS 消费者为 impl-ts#179;UI #75 与版本 PR #76 已合并,UI 2.7.0 已正式发行;TS 已升级正式依赖,仍保持 draft。