Git development
 help / color / mirror / Atom feed
From: Tuomas Ahola <taahol@utu.fi>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org,
	"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Jean-Noël Avila" <jn.avila@free.fr>
Subject: Re: [PATCH v2 3/3] doc: git-config: escape erroneous highlight markup
Date: Thu, 11 Jun 2026 16:28:30 +0300	[thread overview]
Message-ID: <20260611132830.FZ0Ks%taahol@utu.fi> (raw)
In-Reply-To: <20260611083139.GA2237523@coredump.intra.peff.net>

Jeff King <peff@peff.net> wrote:

> On Thu, Jun 11, 2026 at 11:02:42AM +0300, Tuomas Ahola wrote:
> 
> > > >  If _<message>_ begins with one or more whitespaces followed
> > > > -by "#", it is used as-is.  If it begins with "#", a space is
> > > > +by "\#", it is used as-is.  If it begins with "\#", a space is
> > > >  prepended before it is used.  Otherwise, a string " # " (a
> > > >  space followed by a hash followed by a space) is prepended
> > > 
> > > I saw the comment on round 1 about this second "#" on the line. But
> > > while we are here, should we be doing the one in the context, too?
> > > 
> > > -Peff
> > 
> > It seems adding that second backslash was already too much, as doc-diff (which
> > I neglected to run before submitting V2) shows:
> > 
> > ```
> > $ ./doc-diff V1 V2
> >  
> >             If <message> begins with one or more whitespaces followed by "#",
> > -           it is used as-is. If it begins with "#", a space is prepended
> > +           it is used as-is. If it begins with "\#", a space is prepended
> >             before it is used. Otherwise, a string " # " (a space followed by a
> >             hash followed by a space) is prepended to it. The resulting string
> >             is placed immediately after the value defined for the variable. The
> > ```
> 
> Heh, it would not be the first time I am baffled by asciidoc's parsing. :)
> 
> Adding a backslash to the third instance "fixes" the second one to me,
> but I wouldn't want to rely on that (plus it breaks the third instance).
> 
> Using backticks does work, though it always opens a typographical
> question. When reading the source, you see `#`, so you get a punctuation
> delimiter but no typographical one. In the rendered output, you'll see
> it in a typewriter font (assuming we fix the config issue), but we'd
> lose the visible punctuation. I could live with that.
> 
> But for " # ", it gets weirder. We need punctuation to call out the
> spaces, but what should happen to the quotes? They are not really part
> of the literal string, so should they go inside or outside the
> backticks? I think it may be a moot point as "` # `" is not parsed as
> you might hope by asciidoc. Doing `" # "` does work, and is probably OK
> enough here.
> 
> -Peff

Okay, I'll change those to `#` and `" # "`.  That seems to be the best,
or the least bad option right now. :-)

--Tuomas

  reply	other threads:[~2026-06-11 13:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-10 18:51 [PATCH 0/3] doc: config: fix AsciiDoc glitches Tuomas Ahola
2026-06-10 18:51 ` [PATCH 1/3] doc: config: terminate runaway lists Tuomas Ahola
2026-06-10 18:51 ` [PATCH 2/3] doc: config/sideband: fix typo in adoc markup Tuomas Ahola
2026-06-10 20:13   ` Kristoffer Haugsbakk
2026-06-10 18:51 ` [PATCH 3/3] doc: git-config: escape erroneous " Tuomas Ahola
2026-06-10 19:50   ` Junio C Hamano
2026-06-10 20:07     ` Junio C Hamano
2026-06-10 22:55 ` [PATCH v2 0/3] doc: config: fix AsciiDoc glitches Tuomas Ahola
2026-06-10 22:55   ` [PATCH v2 1/3] doc: config: terminate runaway lists Tuomas Ahola
2026-06-11  6:02     ` Jeff King
2026-06-10 22:55   ` [PATCH v2 2/3] doc: config/sideband: fix description list delimiter Tuomas Ahola
2026-06-10 22:55   ` [PATCH v2 3/3] doc: git-config: escape erroneous highlight markup Tuomas Ahola
2026-06-11  6:11     ` Jeff King
2026-06-11  6:24       ` Jeff King
2026-06-11  6:25         ` Jeff King
2026-06-11 20:43           ` Jean-Noël AVILA
2026-06-11  8:02       ` Tuomas Ahola
2026-06-11  8:31         ` Jeff King
2026-06-11 13:28           ` Tuomas Ahola [this message]
2026-06-11 17:33           ` Junio C Hamano
2026-06-11 16:19 ` [PATCH v3 0/3] doc: config: fix AsciiDoc glitches Tuomas Ahola
2026-06-11 16:19   ` [PATCH v3 1/3] doc: config: terminate runaway lists Tuomas Ahola
2026-06-11 16:19   ` [PATCH v3 2/3] doc: config/sideband: fix description list delimiter Tuomas Ahola
2026-06-11 16:19   ` [PATCH v3 3/3] doc: git-config: escape erroneous highlight markup Tuomas Ahola

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

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

  git send-email \
    --in-reply-to=20260611132830.FZ0Ks%taahol@utu.fi \
    --to=taahol@utu.fi \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jn.avila@free.fr \
    --cc=kristofferhaugsbakk@fastmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox