Skip to content

[Docs] Fix formatting issues in API docs: en-dashes and RST inline code syntax#7796

Merged
Echo-Nie merged 1 commit intoPaddlePaddle:developfrom
StatefulDust:fix/api-docs-formatting-issues-20260228-0b09fa211bb9902c
Feb 28, 2026
Merged

[Docs] Fix formatting issues in API docs: en-dashes and RST inline code syntax#7796
Echo-Nie merged 1 commit intoPaddlePaddle:developfrom
StatefulDust:fix/api-docs-formatting-issues-20260228-0b09fa211bb9902c

Conversation

@ooooo-create
Copy link
Collaborator

Summary

This PR fixes formatting issues found in 3 API documentation files under docs/api/paddle/.

Changes

1. docs/api/paddle/distributed/reduce_scatter_cn.rst

  • Replaced en-dash (, U+2013) with regular hyphen (-) in parameter descriptions for tensor and tensor_list parameters
  • The en-dash was inconsistent with all other parameter descriptions in the same file and across the codebase

2. docs/api/paddle/distributed/stream/reduce_scatter_cn.rst

  • Replaced en-dash (, U+2013) with regular hyphen (-) in the tensor parameter description
  • Same issue as above

3. docs/api/paddle/fft/Overview_cn.rst

  • Fixed single backtick to double backtick for inline code: `X[(n+1)//2]` X[(n+1)//2]
  • Added missing space between inline code and following Chinese text
  • Single backticks in RST create "interpreted text" (cross-references), while double backticks create inline literals (code). The surrounding text uses double backticks consistently (e.g., X[(n-1)//2] ), so this was an inconsistency

Standards Compliance

These fixes address violations of the documentation standards described in .github/copilot-instructions.md:

  • RST syntax compliance: use double backticks for inline code literals
  • Consistency in formatting within and across files

Generated by API Docs Checker


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

…ne code syntax

- docs/api/paddle/distributed/reduce_scatter_cn.rst: Replace en-dash (–) with
  regular hyphen (-) in parameter descriptions for tensor and tensor_list params
- docs/api/paddle/distributed/stream/reduce_scatter_cn.rst: Replace en-dash (–)
  with regular hyphen (-) in tensor parameter description
- docs/api/paddle/fft/Overview_cn.rst: Fix single backtick to double backtick for
  inline code `X[(n+1)//2]` -> ``X[(n+1)//2]`` and add missing space before
  Chinese text

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 28, 2026 14:06
@paddle-bot
Copy link

paddle-bot bot commented Feb 28, 2026

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7796.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@github-actions
Copy link

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

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/ 下的中文 API 文档进行小范围格式修复,主要解决 RST 行内代码与参数列表分隔符的排版一致性问题,以避免 Sphinx 渲染异常或风格不统一。

Changes:

  • 将参数描述中的 en-dash()统一替换为常规连字符(-),与同文件其余参数列表风格一致
  • 修复 RST 行内代码标记:将单反引号改为双反引号(inline literal),并补齐代码后与中文之间的空格

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/api/paddle/fft/Overview_cn.rst 修复一处行内代码从 interpreted text 改为 inline literal,并补齐代码与中文间空格
docs/api/paddle/distributed/stream/reduce_scatter_cn.rst 将参数列表分隔符由 en-dash 改为 -,与同页其余参数一致
docs/api/paddle/distributed/reduce_scatter_cn.rst tensor/tensor_list 参数分隔符由 en-dash 改为 -,统一格式

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

@Echo-Nie Echo-Nie merged commit a046049 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