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

Re: [PATCH] doc: git-clone fix discrepancy between asciidoc and asciidoctor

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 22, 2024, 16:39 UTC
Message-ID
<xmqqplr5e5yk.fsf@gitster.g>
In-Reply-To
<8404759.T7Z3S40VBb@cayenne>
Jean-Noël AVILA <jn.avila@free.fr> writes:
Show 18 quoted lines
> Sorry for not being clear. Indeed I was wrong, Asciidoc.py also has this role 
> management  behavior for any other inline markup (++, _, *, ^,  ~) except for 
> back-quoted text.
>  
>> How about phrasing it more like so?
>> 
>>     Writing a string inside [square brackets], immediately followed
>>     by a string inside `a pair of back quotes`, causes asciidoctor
>>     to eliminate the string inside [square brackets], because it is
>>     a syntax to trigger a "generalized role" feature, which we do
>>     not care about in the context of the synopsis section here.
>> 
>>     Work it around by inserting an otherwise no-op {empty} string to
>>     forbid asciidoctor from triggering that feature here.  AsciiDoc
>>     is not affected negatively by this additional empty string.
>> 
>
> OK, but let's get rid of the "generalized role" stuff, then. 

I agree it is not relevant what the feature is called, as that is something we did not want to trigger and take advantage of.

It still is necessary to mention the fact that [strings] are eaten by us unknowingly triggering the feature.

Show 12 quoted lines
> While doing the styling of synopsis, I tried to be smarter than that. There 
> are basically 3 semantic entities in the grammar:
>
>  * the _<placeholders>_ in italic
>  * the `keywords`, in monospace
>  * the grammar signs: [, ], |, ..., (, ), etc. These signs are not typeset.
>
> Setting everything in monospace would mix keywords and grammar.
>
> With this schema in mind, I don't find difficult to understand how the synopsis 
> is written (putting aside the  {empty} hack). Fair enough, this is more 
> difficult than just plain text, but the aim is still to get decent output.
Thanks.

It appears that asciidoctor considers `monospaced` that results in <code>...</code> is a bad match in the SYNOPSIS section

 cf. https://lore.kernel.org/git/xmqqsew3hdmv.fsf@gitster.g/
but we should be able to sort it out.
Previous: Jean-Noël AVILANext: Jean-Noël Avila
Message 5 of 10 in “doc: git-clone fix discrepancy between asciidoc and asciidoctor”
  1. doc: git-clone fix discrepancy between asciidoc and asciidoctorJean-Noël Avila via GitGitGadget, Jul 20, 2024
  2. Junio C HamanoJul 20, 2024
  3. Junio C HamanoJul 20, 2024
  4. Jean-Noël AVILAJul 21, 2024
  5. Junio C HamanoJul 22, 2024
  6. Jean-Noël AvilaJul 23, 2024
  7. Junio C HamanoJul 23, 2024
  8. Junio C HamanoJul 23, 2024
  9. Eric SunshineJul 23, 2024
  10. Junio C HamanoJul 23, 2024

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.