Repository navigation
Conversation
Author
|
抱歉,这个 PR 与 #539 重复了:#539 已对同一行(book/02-git-basics/sections/undoing.asc:134)做了完全相同的修复( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
2.4 撤消操作 → 撤消对文件的更改 一节的 IMPORTANT 提示中,
git checkout -- <file>被渲染成git checkout — <file>(两个连字符变成了 U+2014 长破折号),读者会误以为这里是一个破折号,而不是 Git 的双连字符选项。对应 issue #536,#539 是同一问题的重复 issue。原因
该行是正文中的行内代码,AsciiDoc 会把被空格包围的
--替换为长破折号(em dash,U+2014);同页 listing block 中的--不参与该替换,所以只有这一处正文受影响。改动
只改一行,对
--的第一个连字符做反斜杠转义,使其按字面量渲染:本地验证
用与
Gemfile一致的 asciidoctor 2.0.12 渲染该节,对比修改前后的 HTML 输出:git checkout渲染为git checkout — <file>(带窄空格的长破折号)git checkout -- <file>(与同页 listing block 中git checkout -- CONTRIBUTING.md的渲染一致)另外全库确认正文行内代码中「空格 +
--+ 空格」只有这一处,没有同类问题遗漏:Fixes #536
Closes #539(重复 issue)