Skip to content

Commit f38786b

Browse files
jnavilagitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c44beea commit f38786b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/pretty-formats.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,11 @@ colon and zero or more comma-separated options. Option values may contain
233233
literal formatting codes. These must be used for commas (`%x2C`) and closing
234234
parentheses (`%x29`), due to their role in the option syntax.
235235
+
236-
** `prefix=<value>`: Shown before the list of ref names. Defaults to "{nbsp}+(+".
236+
** `prefix=<value>`: Shown before the list of ref names. Defaults to "{nbsp}++(++".
237237
** `suffix=<value>`: Shown after the list of ref names. Defaults to "+)+".
238238
** `separator=<value>`: Shown between ref names. Defaults to "+,+{nbsp}".
239239
** `pointer=<value>`: Shown between HEAD and the branch it points to, if any.
240-
Defaults to "{nbsp}+->+{nbsp}".
240+
Defaults to "{nbsp}++->++{nbsp}".
241241
** `tag=<value>`: Shown before tag names. Defaults to "`tag:`{nbsp}".
242242
243243
+

0 commit comments

Comments
 (0)