]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: clarify the format of placeholders
authorJean-Noël Avila <jn.avila@free.fr>
Wed, 21 Feb 2024 21:18:59 +0000 (21:18 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Feb 2024 22:01:46 +0000 (14:01 -0800)
Add the new format rule when using placeholders in the description of
commands and options.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/CodingGuidelines

index 65af8d82cedd5fdfd46005d4b4e75114a74810fb..15195cd976f54c9aa52270e3ea8f56212bb46078 100644 (file)
@@ -666,6 +666,11 @@ Writing Documentation:
    <new-branch-name>
    --template=<template-directory>
 
+ When a placeholder is cited in text paragraph, it is enclosed in angle
+ brackets to remind the reader the reference in the synopsis section.
+ For better visibility, the placeholder is typeset in italics:
+   The _<file>_ to be added.
+
  Possibility of multiple occurrences is indicated by three dots:
    <file>...
    (One or more of <file>.)
@@ -751,6 +756,8 @@ Writing Documentation:
    Incorrect:
       `\--pretty=oneline`
 
+A placeholder is not enclosed in backticks, as it is not a literal.
+
  If some place in the documentation needs to typeset a command usage
  example with inline substitutions, it is fine to use +monospaced and
  inline substituted text+ instead of `monospaced literal text`, and with