Skip to content

docs(dataset): fix zh-CN typography in RAG intro (#7531) - #7591

Merged
c121914yu merged 1 commit into
labring:mainfrom
skyzhao1223:docs/7531-rag-typography
Aug 25, 2026
Merged

c121914yu merged 1 commit into
labring:mainfrom
skyzhao1223:docs/7531-rag-typography

Conversation

@skyzhao1223

Copy link
Copy Markdown
Contributor

说明

针对 issue #7531,修复 document/content/guide/dataset/rag.mdx(知识库基础原理介绍)中的中文排版格式问题。

改动内容

  • 中英文之间加空格(如 介绍RAG模型 → 介绍 RAG 模型),共 ~120 处
  • 修复全角标点空格(如 质量 。 → 质量。、背景: 传统 → 背景:传统)
  • 修复链接文本([RAG文档] → [RAG 文档]),URL 保持完整

方法说明

未直接使用 textlint --fix,因为它在多个文档上会破坏结构(合并列表项、改写代码块、删除空行,详见我在此 issue 的回复)。本次采用:

  1. 精确脚本只做中英文间加空格(保护 URL)
  2. 手动修复全角标点空格
  3. 人工逐处审查 diff

有意保留的 2 处 textlint 误报

  • 任务-生成任务、查询-答案对:复合术语连字符,与仓库现有写法(如 系统配置-成员配置、管理员-模型提供商)保持一致,未按 textlint 拆成 任务 - 生成任务

验证

  • git diff --numstat:121 增 121 删,行数不变,无结构破坏
  • textlint error 从 98 处降至 4 处(均为上述术语连字符误报)
  • prettier 通过

Add spaces between CJK and Latin characters and fix full-width
punctuation spacing throughout the dataset RAG principles doc.
Applied a targeted script (protecting URLs) plus manual review.

Keeps hyphenated compound terms (任务-生成任务, 查询-答案对) intact to
match existing docs like 系统配置-成员配置; textlint's zhRuleSeries
false-positives on these were intentionally not applied.

Verified: 122 insertions / 122 deletions, line count unchanged, no
structural change; textlint errors on the file drop from 98 to 6 (all
benign terminology/link-boundary false positives).
@skyzhao1223 skyzhao1223 mentioned this pull request Aug 25, 2026
4 of 5 tasks
@c121914yu
c121914yu merged commit 02c911f into labring:main Aug 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants