doc-add-simple-hash
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese为文档标题添加简单哈希锚点
Add Simple Hash Anchors to Document Headings
当前markdown文档系统支持 {#simple-hash} 的语法来让中文标题的哈希锚点变为简单的英文哈希锚点,例如:
markdown
undefinedThe current Markdown document system supports the {#simple-hash} syntax to convert hash anchors of Chinese headings into simple English hash anchors. For example:
markdown
undefined文档标题 {#simple-hash}
文档标题 {#simple-hash}
会生成哈希锚点 `#simple-hash`,而不是默认的 `#文档标题`。
需要扫描用户当前文档中的中文标题,根据其中文内容语义通过上述语法生成简单的英文哈希锚点。
This will generate the hash anchor `#simple-hash` instead of the default `#文档标题`.
You need to scan the Chinese headings in the user's current document, and generate simple English hash anchors using the above syntax based on the semantic meaning of the Chinese content.特别注意
Special Notes
- 哈希锚点只能包含小写字母、数字和短横线(-),不能包含空格或其他特殊字符。
- 哈希锚点不能以短横线开头或结尾。
- 哈希锚点不能与文档中其他标题的哈希锚点重复。
- Hash anchors can only contain lowercase letters, numbers, and hyphens (-), and cannot include spaces or other special characters.
- Hash anchors cannot start or end with a hyphen.
- Hash anchors cannot duplicate the hash anchors of other headings in the document.