[Docs] Fix RST formatting issues in diagonal, diff, and diagflat API docs#7792
Merged
Echo-Nie merged 2 commits intoPaddlePaddle:developfrom Feb 28, 2026
Conversation
- diagonal_cn.rst: Fix Chinese colon (:) to hyphen (-) after parameter type, fix full-width parentheses () to regular (), fix typo '既' to '即', fix single backtick to double backtick in return description - diff_cn.rst: Fix single backticks to double backticks for inline code (`n`, `Tensor`), remove extraneous Chinese colon from '代码示例:' section title - diagflat_cn.rst: Fix single backtick to double backtick for inline `Tensor` Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 针对 docs/api/paddle/ 下的 3 个中文 API .rst 文档进行格式合规修正,主要聚焦于 RST inline code 标记、参数/返回值描述的标点与排版一致性,以减少 Sphinx/RST 构建告警并提升文档可读性。
Changes:
- 统一并修正 RST inline code 标记(如将
Tensor/n调整为Tensor/n)。 - 修正参数列表中的中文/全角标点与分隔符格式(如将中文冒号改为连字符、全角括号改为半角括号)。
- 修正小范围中文用字错误,并规范“代码示例”小节标题格式。
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/api/paddle/diff_cn.rst | 修正 n/Tensor 的 inline code 标记与“代码示例”标题格式,避免 RST 解释为交叉引用。 |
| docs/api/paddle/diagonal_cn.rst | 规范参数列表分隔符/括号格式,修正“既→即”,并统一返回值类型的 inline code 标记。 |
| docs/api/paddle/diagflat_cn.rst | 将参数描述中的 Tensor 修正为 Tensor 以符合 RST inline code 语法。 |
63eb1cd to
5b1aee2
Compare
Echo-Nie
approved these changes
Feb 28, 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.
Summary
This PR fixes RST formatting compliance issues found in three API documentation files under
docs/api/paddle/.Changes
docs/api/paddle/diagonal_cn.rst**x**description(int,可选)to regular parentheses(int,可选)foroffset,axis1,axis2parameters既主对角线→即主对角线("即" means "i.e./namely"; "既" is incorrect here)`Tensor`to double backtick``Tensor``in return value descriptiondocs/api/paddle/diff_cn.rst`n`and`Tensor`to double backticks``n``and``Tensor``for proper RST inline code formatting (single backtick in RST creates a cross-reference, not inline code)的afternfor readability代码示例:section title to match standard format (代码示例)docs/api/paddle/diagflat_cn.rst`Tensor`to double backtick``Tensor``for proper RST inline code formattingCompliance Standards Applied
Per the repository documentation standards in
.github/copilot-instructions.md:``code``) not single backticks