git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH 1/2] doc: git-checkout: trivial callout cleanup
Date: Mon, 24 Apr 2023 07:28:33 -0600	[thread overview]
Message-ID: <644684018a766_aba29424@chronos.notmuch> (raw)
In-Reply-To: <xmqq8ren8xz1.fsf@gitster.g>

Junio C Hamano wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
> 
> > The callouts are directly tied to the listing above, remove spaces to
> > make it clear they are one and the same.
> >
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > ---
> >  Documentation/git-checkout.txt | 4 ----
> >  1 file changed, 4 deletions(-)
> 
> I tried to format git-checkout.1 and git-checkout.html from HEAD and
> HEAD^ after applying this step, with asciidoc and asciidoctor, and
> did not see any difference that came from this patch.  Am I correct
> to understand that this patch is done purely for the benefit of
> human readers, and not for formatting machinery?

No, it's for the formatting machinery.

The fact that both asciidoc and asciidoctor happen to understand our quircky
formatting in this particualr situation doesn't mean it isn't quirky.

In this particular case the parsers do understand what we are trying to do,
because we just just pepper list continuations (`+`) everywhere and it happens
to work.

This works:

  1. item
  +
  ----
  line 1 <1>
  ----
  +
  <1> callout 1

But if we used an open block instead (which is more propper), this does not:

  1. item
  +
  --
  ----
  line 1 <1>
  ----
  +
  <1> callout 1
  --

This discrepancy confused Jeff in [1].

[1] https://lore.kernel.org/git/20230418061713.GA169940@coredump.intra.peff.net/

> It may be subjective for those who read the source if it is easier
> to read with or without inter-paragraph spaces, but in any case, the
> resulting source material now look the same way between two hunks,
> and consistency is good.

That is an added benefit.

It's simply a good practice to follow the format asciidoctor documentation:
which doesn't contain spaces, doesn't require adding list continations, it's
easier to interpret by the parsers, and works inside open blocks.

-- 
Felipe Contreras

  reply	other threads:[~2023-04-24 13:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18  7:00 [PATCH 0/2] doc: git-checkout: trivial style improvements Felipe Contreras
2023-04-18  7:00 ` [PATCH 1/2] doc: git-checkout: trivial callout cleanup Felipe Contreras
2023-04-19 19:37   ` Junio C Hamano
2023-04-24 13:28     ` Felipe Contreras [this message]
2023-04-25  0:02       ` Junio C Hamano
2023-04-25  6:10         ` Jeff King
2023-04-27 22:09           ` Felipe Contreras
2023-05-02 10:18             ` Jeff King
2023-05-02 16:05               ` Felipe Contreras
2023-05-03  6:09               ` Junio C Hamano
2023-05-03 13:46                 ` Felipe Contreras
2023-05-03 17:44           ` Junio C Hamano
2023-04-27 21:30         ` Felipe Contreras
2023-04-18  7:00 ` [PATCH 2/2] doc: git-checkout: reorganize examples Felipe Contreras
2023-04-19 19:37   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=644684018a766_aba29424@chronos.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).