如何使用 Markdown 链接引用同一文档的部分,其中标题是带空格的句子?
How do I make linked references to sections of the same document using Markdown where the heading title is a sentence with spaces?
虽然这有效
1. [Notifier system requirements](#requirements)
这行不通
1. [Deployment steps](#steps to deployment)
Steps to deployment
和 requirements
是我 README.md
文件中的 header/section 标题。
查看呈现的目标 header,将鼠标悬停在目标上或使用浏览器的开发工具对其进行检查。您应该会发现 "Steps to deployment" header 的目标不是 steps to deployment
,而是 steps-to-deployment
.
像这样更新您的 link 它应该可以工作:
1. [Deployment steps](#steps-to-deployment)
根据此 filter (linked from github/markup),GitHub 使用以下步骤将文本转换为 slug:
- 将所有字符转换为小写 ASCII 字符。
- 删除除空格和连字符以外的所有标点符号。
- 将所有空格转换为连字符。
因此,您的 link 应该是:
[Deployment steps](#steps-to-deployment)
虽然这有效
1. [Notifier system requirements](#requirements)
这行不通
1. [Deployment steps](#steps to deployment)
Steps to deployment
和 requirements
是我 README.md
文件中的 header/section 标题。
查看呈现的目标 header,将鼠标悬停在目标上或使用浏览器的开发工具对其进行检查。您应该会发现 "Steps to deployment" header 的目标不是 steps to deployment
,而是 steps-to-deployment
.
像这样更新您的 link 它应该可以工作:
1. [Deployment steps](#steps-to-deployment)
根据此 filter (linked from github/markup),GitHub 使用以下步骤将文本转换为 slug:
- 将所有字符转换为小写 ASCII 字符。
- 删除除空格和连字符以外的所有标点符号。
- 将所有空格转换为连字符。
因此,您的 link 应该是:
[Deployment steps](#steps-to-deployment)