提交 41f5b21f 编写于 作者: T Tom Russello 提交者: Junio C Hamano

doc: clearer rule about formatting literals

Make the guideline text that we want for our documentation clearer.
Signed-off-by: NTom Russello <tom.russello@grenoble-inp.org>
Signed-off-by: NErwan Mathoniere <erwan.mathoniere@grenoble-inp.org>
Signed-off-by: NSamuel Groot <samuel.groot@grenoble-inp.org>
Signed-off-by: NMatthieu Moy <matthieu.moy@grenoble-inp.fr>
Reviewed-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 0b65a8db
......@@ -526,12 +526,19 @@ Writing Documentation:
modifying paragraphs or option/command explanations that contain options
or commands:
Literal examples (e.g. use of command-line options, command names, and
configuration variables) are typeset in monospace, and if you can use
`backticks around word phrases`, do so.
Literal examples (e.g. use of command-line options, command names,
configuration and environment variables) must be typeset in monospace (i.e.
wrapped with backticks):
`--pretty=oneline`
`git rev-list`
`remote.pushDefault`
`GIT_DIR`
An environment variable must be prefixed with "$" only when referring to its
value and not when referring to the variable itself, in this case there is
nothing to add except the backticks:
`GIT_DIR` is specified
`$GIT_DIR/hooks/pre-receive`
Word phrases enclosed in `backtick characters` are rendered literally
and will not be further expanded. The use of `backticks` to achieve the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册