]> git.ipfire.org Git - thirdparty/git.git/commit
doc: fix asciidoc format compatibility in pretty-formats.adoc
authorJean-Noël Avila <jn.avila@free.fr>
Wed, 20 Aug 2025 21:23:19 +0000 (23:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Aug 2025 21:35:31 +0000 (14:35 -0700)
commitf38786baa7c2d7ada1e9470c2a0797d1292c529e
tree0a618fd29f33c67f2b32e5a318c1e42de4d6e963
parentc44beea485f0f2feaf460e2ac87fdd5608d63cf0
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 <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/pretty-formats.adoc