Re: [PATCH v2 3/3] doc: git-config: escape erroneous highlight markup
- From
Jeff King <peff@peff.net>
- Date
- Jun 12, 2026, 05:16 UTC
- Message-ID
- <20260612051605.GB593075@coredump.intra.peff.net>
- In-Reply-To
- <5106812.31r3eYUQgx@piment-oiseau>
On Thu, Jun 11, 2026 at 10:43:44PM +0200, Jean-Noël AVILA wrote:
> Oh, this is the black magic regexp that is not considering # for keyword > character. Should be solved by something like (and I really hate these .in > files):
Your patch looks reasonable to me, but for some reason I get this doc-diff output when comparing before/after (what we don't see is the improved output from bolding those chars, since doc-diff doesn't show any markup):
diff --git a/73bccdb573fbdf3df4abf37570be486fc0f53d4a/home/peff/share/man/man1/git-config.1 b/926d9be4ab7ee1a57d4c570ec0f8aba28b3c2af5/home/peff/share/man/man1/git-config.1 index b77d79f..b2bced2 100644 --- a/73bccdb573fbdf3df4abf37570be486fc0f53d4a/home/peff/share/man/man1/git-config.1 +++ b/926d9be4ab7ee1a57d4c570ec0f8aba28b3c2af5/home/peff/share/man/man1/git-config.1 @@ -6983,7 +6983,7 @@ CONFIGURATION FILE status.displayCommentPrefix If set to true, git-status(1) will insert a comment prefix before each - output line (starting with core.commentChar, i.e. # by default). This + output line (starting with core.commentChar, i.e. # by default). This was the behavior of git-status(1) in Git 1.8.4 and previous. Defaults to false. And I can see the extra space when looking at the rendered manpage. The XML output looks reasonable, though: (starting with <literal>core.commentChar</literal>, i.e. <literal>#</literal> by default as does the HTML. So perhaps it is happening at the roff level? But that looks like: will insert a comment prefix before each output line (starting with \fBcore\&.commentChar\fR, i\&.e\&. \fB#\fR by default)\&. This was the behavior of So...weird. groff wants to add extra space for some reason. It happens even if I drop the bolding, and just have "#" on a line by itself. I guess maybe it is the trailing "." of the previous line putting groff into "oh, I'm starting a new sentence" mode and it uses two spaces. But I think that is all outside the scope of your fix, and this is an existing issue that we are now just unlucky enough to hit. I'd be tempted to ignore it and possibly fix it later. -Peff