2017-05-27 78 views
0

我想创建一个带有Asciidoctor的Q & A.大多数答案都涉及命令行指令,我在[source]部分中需要这些指令。 但是,似乎[源]块标记[qanda]块的结尾。qanda答案中的源块

[qanda] 
How do you show all the changes introduced in branchA since its common ancestor commit with branchB?:: 
    Having branchA and branchB as valid pointers, run 
[source,sh] 
---- 
$ git log branchB..branchA 
---- 
You probably mean branchA and branchB to be recently related. 

How do you see the contents of a stash?:: 
    `git stash show -p "stash{0}"` 

第二个问题被显示为标记的列表的第一个元素。

有没有办法在Asciidoctor中表达?

回答

1

您应该在[source,sh]之前的行中添加一个“+”。完整的文件应该看起来像:

[qanda] 
How do you show all the changes introduced in branchA since its common ancestor commit with branchB?:: 
Having branchA and branchB as valid pointers, run 
+ 
[source,sh] 
---- 
$ git log branchB..branchA 
---- 
You probably mean branchA and branchB to be recently related. 

How do you see the contents of a stash?:: 
`git stash show -p "stash{0}"`