Re: [PATCH v2] gitglossary: fix indentation of sub-lists
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Apr 12, 2026, 09:10 UTC
- Message-ID
- <ee8d43cc-c38b-4a55-8237-94f92034d62f@app.fastmail.com>
- In-Reply-To
- <20260411215518.GA1651019@coredump.intra.peff.net>
On Sat, Apr 11, 2026, at 23:55, Jeff King wrote:
Show 29 quoted lines
> On Sat, Apr 11, 2026 at 05:42:13PM -0400, Jeff King wrote: > >> > I think the first thing is caused by the context already being in an >> > open block? >> >> Yes. Looks like asciidoc learned to handle nested entries better, but >> perhaps asciidoctor didn't. >> >> I think I've found a workaround, which I'll post in a moment. Thanks for >> reporting. > > Here it is. > > -- >8 -- > Subject: [PATCH] gitglossary: fix indentation of sub-lists > >[snip] > > Usually we'd fix this by using "--" markers, which put the sub-list into > its own block. But there's a catch: in some of these spots we are > already in an open block, and nesting open blocks is a problem. It seems > to work for me using Asciidoc 10.2.1, but Asciidoctor 2.0.26 makes a > mess of it (our intent to open a new block seems to close the old one). > > Fortunately there's a work-around: when using a "+" list-continuation, > the number of empty lines above the continuation indicates which level > of parent list to continue. So by adding an empty line after our > unordered list (before the "+"), we should be able to continue the > definition list item.
Nice.
> > But asciidoc being asciidoc, of course that is not the end of the story.
Ouch.
> That technique works fine for the "glob" and "attr" lists in this patch, > but under the "refs" item it works for only 1 of the 2 lists! I can't > figure out why, and this may be an asciidoctor bug. But we can work
You mention “asciidoc being asciidoc” but here it seems to be about Asciidoctor?
Show 6 quoted lines
> around it by using "--" open-block markers here, since we're not > already in an open block. > > So using the extra blank line for the first two instances, and "--" > markers for the second two, this patch produces identical output from > "doc-diff HEAD^ HEAD" for both --asciidoctor and --ascii modes.
Nit: s/--ascii/--asciidoc/
> > Signed-off-by: Jeff King <peff@peff.net> > --- >[snip]