From: Junio C Hamano Date: Tue, 12 Nov 2024 09:13:20 GMT Subject: Re: [PATCH v2 1/5] doc: git-diff: apply new documentation guidelines Message-ID: In-Reply-To: <7b42828a-2cbe-47c6-b21e-b8c1e3a2ad01@free.fr> Jean-Noël Avila writes: > With the new document processor extension, the back tick quotes have > become smarter and they behave basically like an inline synopsis > section. Here, this means that the line will be formatted roughly as > follows: > > `git diff` [__] [`--`] [__...] Ahh, yes, it is the key magic how your "enclosing the whole line" works. It's been so long since we adopted the topic that laid the groundwork that I forgot ;-) Again, it is very pleasant for us writers to be able to just do so. >>> +`-1` `--base`:: >>> +`-2` `--ours`:: >>> +`-3` `--theirs`:: >> >> Why aren't these `-1 --base` and instead mark up individual tokens? >> > > Here, it is quite awkward, because we are mixing alternate spellings of > the same option (`-1` and `--base` have the same meaning) with the fact > that these options are meant to be alternatives. The latter meaning is > not what is usually conveyed in the lists of options, which blurs the > following explanation. > > To clarify, from what I understand, it would be better to fully spell > out the way these options are used by using the synopsis syntax: > > `(-1|--base) | (-2|--ours) | (-3|--theirs)`:: > > Is it how it works? Yeah, that may be a more sensible rewrite (regardless of this "better mark-up" topic). Thanks.