Repository navigation
出处闭环:断语上的引文可以点开核对 - #57
Merged
Merged
Conversation
《黄帝内经》那件事之后剩下的活:引文可核不能只在 CI 里成立,读者点得到才算。 - 契约新增 quote 节点(书名 + 篇章 + 引文 + 释义)。canon 出处不再退化成 排好版的纯文本;未标注处的断语照旧给 warn。 - ResultView 渲染"查原文",href 走 hash 路由 `#/reading?bk=…&q=…&loc=…`。 渲染器保持无 IO、无 router 依赖:它被首页、单测、任何工具独立挂载时 也得能用,书目 id 的解析留给阅览室。 - 阅览室接 route.query:先按 book-aliases 解析引用书名(《黄帝内经》→ 素问/灵枢), 再只在解析出的书里搜首段引文,命中列出来由读者点进章节——不自动跳章, 把"这句话在不在"的判断权留给读者。别名指不到任何书时如实报错,不全域乱搜冒充命中。 程序化检索走 suppress 标记,避免和输入框的防抖检索抢写 hits。 - 首页今日一签同样走 quote 节点,全站只有一条出处渲染路径。 - tests/citation.spec.ts:每条 canon 断语都要渲染出可点链接(引文取去省略号的首段, 否则阅览室永远搜不到);真挂载阅览室走完《黄帝内经》→ 素问 → 搜出"恬淡虚无"; 书名不存在时报错且零命中。 - tool.spec:NODE_KINDS 加 quote,新增"canon 必须是 quote 节点"结构断言, 并禁止引文以省略号结尾(截断式引用是凭印象引书的痕迹)。 - app.spec:ResultView 节点覆盖加 .qt 与 href 参数校验; set 微任务的 settle() 换成 until(条件) 轮询——写死的 6+1+3 轮在 npm run check 有负载时会漏一轮,这是它偶发红的真因。 门禁 75 passed / 29 条引文可核 / README 一致 / build OK。
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.
《黄帝内经》那件事剩下的活:引文可核不能只在 CI 里成立,读者点得到才算数。
quote节点(书名 + 篇章 + 引文 + 释义)。canon 出处不再退化成排好版的纯文本。ResultView渲染"查原文",href 走 hash 路由#/reading?bk=…&q=…&loc=…。渲染器保持无 IO、无 router 依赖——它被首页、单测、任何工具独立挂载时也得能用,书目 id 的解析留给阅览室。route.query:先按book-aliases解析引用书名(《黄帝内经》→ 素问/灵枢),再只在解析出的书里搜首段引文。命中列出来由读者点进章节,不自动跳章——把"这句话到底在不在"的判断权留给读者。别名指不到任何书时如实报错,不全域乱搜冒充命中。tests/citation.spec.ts:每条 canon 断语都要渲染出可点链接(引文取去省略号的首段,否则阅览室永远搜不到);真挂载阅览室走完《黄帝内经》→ 素问 → 搜出"恬淡虚无";书名不存在时报错且零命中。tool.spec:NODE_KINDS加 quote,新增"canon 必须是 quote 节点"的结构断言,并禁止引文以省略号结尾——截断式引用是凭印象引书的痕迹。顺带修掉 CI 偶发红:
settle()写死的 6+1+3 轮微任务在npm run check有负载时会漏一轮,改成until(条件)轮询,超时才如实失败。门禁:75 passed / 29 条引文可核 / README 一致 / build OK。版本仍 0.0.1。