Skip to content

[Docs] Fix RST formatting issues in diagonal, diff, and diagflat API docs#7792

Merged
Echo-Nie merged 2 commits intoPaddlePaddle:developfrom
StatefulDust:fix/api-docs-compliance-diagonal-diff-diagflat-b89bc90f0a8a3508
Feb 28, 2026
Merged

[Docs] Fix RST formatting issues in diagonal, diff, and diagflat API docs#7792
Echo-Nie merged 2 commits intoPaddlePaddle:developfrom
StatefulDust:fix/api-docs-compliance-diagonal-diff-diagflat-b89bc90f0a8a3508

Conversation

@ooooo-create
Copy link
Collaborator

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

  • Fixed Chinese colon (:) to hyphen (-) after parameter type in **x** description
  • Fixed full-width parentheses (int,可选) to regular parentheses (int,可选) for offset, axis1, axis2 parameters
  • Fixed typo: 既主对角线即主对角线 ("即" means "i.e./namely"; "既" is incorrect here)
  • Fixed single backtick `Tensor` to double backtick ``Tensor`` in return value description
  • Fixed comma separator to hyphen in return value description to match standard format

docs/api/paddle/diff_cn.rst

  • Fixed single backticks `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)
  • Added space before after n for readability
  • Removed extraneous Chinese colon (:) from 代码示例: section title to match standard format (代码示例)

docs/api/paddle/diagflat_cn.rst

  • Fixed single backtick `Tensor` to double backtick ``Tensor`` for proper RST inline code formatting

Compliance Standards Applied

Per the repository documentation standards in .github/copilot-instructions.md:

  • RST inline code should use double backticks (``code``) not single backticks
  • Parameter descriptions should use regular (ASCII) parentheses and hyphens, not Chinese/full-width equivalents
  • Chinese text should use correct Chinese characters (typo fix: 既→即)

Generated by API Docs Checker


🔄 Synced from https://github.com/StatefulDust/paddle-docs-agent/pull/8

- 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>
Copilot AI review requested due to automatic review settings February 28, 2026 08:43
@CLAassistant
Copy link

CLAassistant commented Feb 28, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

github-actions bot commented Feb 28, 2026

📚 本次 PR 文档预览链接(点击展开)
ℹ️ 预览提醒
请等待 Docs-NEW 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 语法。

@ooooo-create ooooo-create force-pushed the fix/api-docs-compliance-diagonal-diff-diagflat-b89bc90f0a8a3508 branch from 63eb1cd to 5b1aee2 Compare February 28, 2026 09:05
@ooooo-create ooooo-create reopened this Feb 28, 2026
@Echo-Nie Echo-Nie merged commit 7d518eb into PaddlePaddle:develop Feb 28, 2026
9 checks passed
@ooooo-create ooooo-create added the HappyOpenSource 快乐开源活动issue与PR label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HappyOpenSource 快乐开源活动issue与PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants