git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] doc: fix asciidoc format compatibility in pretty-formats.adoc

From
Jean-Noël AVILA <jn.avila@free.fr>
Date
Aug 20, 2025, 21:00 UTC
Message-ID
<4673610.LvFx2qVVIh@cayenne>
In-Reply-To
<xmqqa53vc77z.fsf@gitster.g>
On Tuesday, 19 August 2025 23:49:36 CEST Junio C Hamano wrote:
Show 6 quoted lines
> Jean-Noël Avila <jn.avila@free.fr> writes:
> > Asciidoc.py and Asciidoctor do not process the same '+' verbatim syntax in
> > the same way. For most usages, Asciidoctor requires a double '+'.
> 
> The word "same" on the first line is probably unwanted?
> 
Definitely. Rerolled in V2.
> > Unfortunately, the postprocessing of verbatim synopsis in asciidoctor 
cannot
Show 8 quoted lines
> > be bypassed and formatting of the parentheses is forced in syntax sign
> > instead of keywords, unless a proper grammar analyzer is used.
> 
> Sorry, I've read the above three times, but it would not explain why
> the change is needed for the "prefix" line, but no change is needed
> for the "suffix" line or for the "separator" line, even though they
> look quite similar.  Is open-parenthesis somehow special?  And '>'
> also special in the same way?

The detection of opening of spans in Asciidoc is driven by a span markup character (here '+') preceded by a non-word character. The condition is symmetrical for closing of spans. I haven't dug into the source code, but it seems that asciidoc.py considers '{nbsp}' as a non-word character, whereas Asciidoctor does not.

Using double markup characters creates 'unconstrained' spans, which do not need the non-word character condition.

Note also that this "feature" is very centric on roman based languages (like many of light markup design decisions) and is a pain in other writing systems which do not require space between words.

Show 13 quoted lines
> 
> > Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
> > ---
> > 
> >  Documentation/pretty-formats.adoc | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > 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
Show 5 quoted lines
> >  parentheses (`%x29`), due to their role in the option syntax.
> >  +
> > 
> > -** `prefix=<value>`: Shown before the list of ref names.  Defaults to
> > "{nbsp}+(+". +** `prefix=<value>`: Shown before the list of ref names.  
Defaults
> > to "{nbsp}++(++".> 
> >  ** `suffix=<value>`: Shown after the list of ref names.  Defaults to "+)
+".
> >  ** `separator=<value>`: Shown between ref names.  Defaults to "+,+
{nbsp}".
> >  ** `pointer=<value>`: Shown between HEAD and the branch it points to, if 
any.
Show 7 quoted lines
> > 
> > -		      Defaults to "{nbsp}+->+{nbsp}".
> > +		      Defaults to "{nbsp}++->++{nbsp}".
> > 
> >  ** `tag=<value>`: Shown before tag names. Defaults to "`tag:`{nbsp}".
> >  
> >  +
Previous: Junio C HamanoNext: Jean-Noël Avila
Message 45 of 50 in “Doc git log”
  1. 0/9 Doc git logJean-Noël Avila via GitGitGadget, Jun 8, 2025
  2. 1/9 doc: convert git-log to new documentation formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  3. Junio C HamanoJun 16, 2025
  4. Jean-Noël AVILAJun 19, 2025
  5. 2/9 doc: git-log convert rev-list-description to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  6. Junio C HamanoJun 19, 2025
  7. Jean-Noël AVILAJun 19, 2025
  8. 3/9 doc: git-log: convert line range options to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  9. 4/9 doc: git-log: convert line range format to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  10. 6/9 doc: git-log: convert pretty options to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  11. 5/9 doc: git-log: convert rev list options to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  12. 8/9 doc: git-log: convert diff options to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  13. 7/9 doc: git-log: convert pretty formats to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  14. Kristoffer HaugsbakkJul 4, 2025
  15. Kristoffer HaugsbakkJul 4, 2025
  16. Jean-Noël AVILAJul 6, 2025
  17. 9/9 doc: git-log: convert log config to new doc formatJean-Noël Avila via GitGitGadget, Jun 8, 2025
  18. Junio C HamanoJun 18, 2025
  19. Jean-Noël AVILAJul 6, 2025
  20. 0/9 doc: convert git log man page to new synopsis formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  21. 1/9 doc: convert git-log to new documentation formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  22. 2/9 doc: git-log convert rev-list-description to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  23. 3/9 doc: git-log: convert line range options to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  24. 4/9 doc: git-log: convert line range format to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  25. 6/9 doc: git-log: convert pretty options to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  26. Kristoffer HaugsbakkJul 4, 2025
  27. 5/9 doc: git-log: convert rev list options to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  28. 7/9 doc: git-log: convert pretty formats to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  29. 8/9 doc: git-log: convert diff options to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  30. 9/9 doc: git-log: convert log config to new doc formatJean-Noël Avila via GitGitGadget, Jun 29, 2025
  31. 0/9 doc: convert git log man page to new synopsis formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  32. 1/9 doc: convert git-log to new documentation formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  33. 2/9 doc: git-log convert rev-list-description to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  34. 3/9 doc: git-log: convert line range options to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  35. 4/9 doc: git-log: convert line range format to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  36. 6/9 doc: git-log: convert pretty options to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  37. 5/9 doc: git-log: convert rev list options to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  38. 7/9 doc: git-log: convert pretty formats to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  39. SZEDER GáborAug 17, 2025
  40. doc: fix asciidoc format compatibility in pretty-formats.adocJean-Noël Avila, Aug 19, 2025
  41. Junio C HamanoAug 19, 2025
  42. doc: fix asciidoc format compatibility in pretty-formats.adocJean-Noël Avila, Aug 20, 2025
  43. doc: fix asciidoc format compatibility in pretty-formats.adocJean-Noël Avila, Aug 20, 2025
  44. Junio C HamanoAug 20, 2025
  45. Jean-Noël AVILAAug 20, 2025
  46. doc: fix asciidoc format compatibility in pretty-formats.adocJean-Noël Avila, Aug 20, 2025
  47. 8/9 doc: git-log: convert diff options to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  48. 9/9 doc: git-log: convert log config to new doc formatJean-Noël Avila via GitGitGadget, Jul 7, 2025
  49. Junio C HamanoJul 7, 2025
  50. Jean-Noël AVILAJul 7, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.