From: Jean-Noël Avila Date: Wed, 20 Aug 2025 21:23:19 +0000 (+0200) Subject: doc: fix asciidoc format compatibility in pretty-formats.adoc X-Git-Tag: v2.51.1~38^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f38786baa7c2d7ada1e9470c2a0797d1292c529e;p=thirdparty%2Fgit.git doc: fix asciidoc format compatibility in pretty-formats.adoc Asciidoc.py and Asciidoctor do not process the '+' verbatim the same way. A span is detected when the format sign (here '+')is preceded by a non-word character. It seems that '{nbsp}' is considered a non-word sign by Asciidoc.py, but not by Asciidoctor. Using a double format-sign opens 'unconstrained' span, independent on the preceding character in both engines. The '+' sign is used instead of the backtick '`' because it is not processed as synopsis in asciidoc.py. Unfortunately, the post-processing of verbatim synopsis in asciidoctor cannot be bypassed and formatting of the parentheses is forced in syntax sign instead of keywords, unless a proper grammar analyzer is used. Signed-off-by: Jean-Noël Avila Signed-off-by: Junio C Hamano --- diff --git a/Documentation/pretty-formats.adoc b/Documentation/pretty-formats.adoc index 9ed0417fc8..618ddc4a0c 100644 --- a/Documentation/pretty-formats.adoc +++ b/Documentation/pretty-formats.adoc @@ -233,11 +233,11 @@ colon and zero or more comma-separated options. Option values may contain literal formatting codes. These must be used for commas (`%x2C`) and closing parentheses (`%x29`), due to their role in the option syntax. + -** `prefix=`: Shown before the list of ref names. Defaults to "{nbsp}+(+". +** `prefix=`: Shown before the list of ref names. Defaults to "{nbsp}++(++". ** `suffix=`: Shown after the list of ref names. Defaults to "+)+". ** `separator=`: Shown between ref names. Defaults to "+,+{nbsp}". ** `pointer=`: Shown between HEAD and the branch it points to, if any. - Defaults to "{nbsp}+->+{nbsp}". + Defaults to "{nbsp}++->++{nbsp}". ** `tag=`: Shown before tag names. Defaults to "`tag:`{nbsp}". +