Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

收集代码变更的文本描述 #6

Open
yescallop opened this issue Mar 10, 2024 · 0 comments
Open

收集代码变更的文本描述 #6

yescallop opened this issue Mar 10, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@yescallop
Copy link
Owner

yescallop commented Mar 10, 2024

假定你已经读过 diff 规范,下列规则说明如何收集代码变更的文本描述(以下简称变更描述)。

  1. 变更描述收集在差异表中,每条变更描述由一行或多行连续的注释行组成,其所描述的是紧接其后的一行或多行连续的变更行。为了兼容差异表中旧的注释,只有当差异表第一行的内容为 #![described] 时,该表中其余的注释行才能被解析为变更描述。
  2. 对于一条变更描述,将组成其的注释行行首的 # 与其后的空白字符去除后,以 \n 连接各行即得到其内容。变更描述的内容使用 Markdown 语法,可使用标题分级,一级标题隐含在其描述的变更中,二级标题由单个 # 起始,以此类推(与 Rust 的文档注释类似)。
  3. 变更描述应尽可能详细,对于引用文本必须说明其来源,尽可能使用超链接。为防止链接失效,可采用自动化脚本将对应的网页或文件存档。例子参见 2022-2023.diff

Useful APIs: Wayback Machine APIs, Save Page Now 2 API.

@yescallop yescallop added the help wanted Extra attention is needed label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant