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
Jean-Noël Avila <jn.avila@free.fr>
Date
Jul 23, 2024, 11:06 UTC
Message-ID
<89d00235-71db-4087-8ffb-7e93c3f470a0@free.fr>
In-Reply-To
<xmqqplr5e5yk.fsf@gitster.g>
Le 22/07/2024 à 18:39, Junio C Hamano a écrit :
Show 49 quoted lines
> Jean-Noël AVILA <jn.avila@free.fr> writes:
> 
>> 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.  
> 
>> 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.
> 

Please hold on this patch. Cranking on your reflections about the ugly markup and upon advice from Dan Allen (of asciidoctor) [1], I'd like to push another way of managing the files, which would be to define a custom 'synopsis' paragraph style which would allow to process automatically the grammar.

Thanks

[1] https://asciidoctor.zulipchat.com/#narrow/stream/279642-users/topic/Is.20there.20a.20way.20to.20disable.20role.20attributes.3F

Previous: Junio C HamanoNext: Junio C Hamano
Message 6 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.