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

Re: [PATCH 2/3] git.txt: fix monospace rendering

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Feb 18, 2021, 06:28 UTC
Message-ID
<CAN0heSoZJgdKHmWcm3BF2-eWtWMPvSf9YSsKuE7+PaBY4LMKtA@mail.gmail.com>
In-Reply-To
<CAPx1GvdcFGmAi_zJ9H0+40uZw49qhTs8C_afnMMVj32EFJXqBQ@mail.gmail.com>
On Wed, 17 Feb 2021 at 23:47, Chris Torek <chris.torek@gmail.com> wrote:
Show 16 quoted lines
>
> On Wed, Feb 17, 2021 at 1:21 PM Martin Ågren <martin.agren@gmail.com> wrote:
> >
> > When we write `<name>`s with the "s" tucked on to the closing backtick,
> > we end up rendering the backticks literally. Rephrase this sentence
> > slightly to render this as monospace.
>
> That seems fine, but one question (diff trimmed way down to
> make it clearer I hope):
>
> >  +           contain an equals sign to avoid ambiguity with <name> containing
>
> > +       to avoid ambiguity with `<name>` containing one.
>
> One replacement drops the backquotes entirely.  The other keeps
> them.  Surely these two shouldn't be *different*...?

I included the output of our "doc-diff" script below the double-dash line. The patch applies just as fine anyway, but I did wonder if it would trip up human readers. :-/

Quoting my original, slightly less trimmed:
On Wed, 17 Feb 2021 at 20:56, Martin Ågren <martin.agren@gmail.com> wrote:
Show 7 quoted lines
>  doc-diff:
>  --- a/.../man/man1/git.1
>  +++ b/.../man/man1/git.1
>  -           contain an equals sign to avoid ambiguity with `<name>`s which
>  -           contain one.
>  +           contain an equals sign to avoid ambiguity with <name> containing
>  +           one.

So that's how the rendering is changed. From "oops, we rendered the backticks literally" to "we no longer do". (It's not clear from the doc-diff that they're rendered monospace/bold, but at least this is no longer obviously broken.)

(Note the extra indentation of all of that. This is where one might place some commentary that one don't want to burden the commit message with, but which also isn't part of the actual diff. Now that this looks very much like a diff, I can see how it's confusing.)

And that's because of this change to the actual sources:
Show 6 quoted lines
> diff --git a/Documentation/git.txt b/Documentation/git.txt
> index d36e6fd482..3a9c44987f 100644
> --- a/Documentation/git.txt
> +++ b/Documentation/git.txt
> -       to avoid ambiguity with `<name>`s which contain one.
> +       to avoid ambiguity with `<name>` containing one.

I hope that clarifies it? It's a bit unfortunate that the misrendering is so similar to the source in the txt file. But I guess that's still better than some of those misrenderings where some cogwheel slips and everything spins out of control through the rest of the paragraph.

Martin
Previous: Chris TorekNext: Patrick Steinhardt
Message 5 of 12 in “fix some doc rendering issues since v2.30.0”
  1. 0/3 fix some doc rendering issues since v2.30.0Martin Ågren, Feb 17, 2021
  2. 1/3 rev-list-options.txt: fix rendering of bonus paragraphMartin Ågren, Feb 17, 2021
  3. 2/3 git.txt: fix monospace renderingMartin Ågren, Feb 17, 2021
  4. Chris TorekFeb 17, 2021
  5. Martin ÅgrenFeb 18, 2021
  6. Patrick SteinhardtFeb 18, 2021
  7. Martin ÅgrenFeb 18, 2021
  8. Junio C HamanoFeb 18, 2021
  9. Martin ÅgrenFeb 19, 2021
  10. 3/3 gitmailmap.txt: fix rendering of e-mail addressesMartin Ågren, Feb 17, 2021
  11. Ævar Arnfjörð BjarmasonFeb 18, 2021
  12. Junio C HamanoFeb 17, 2021

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.