From: Jeff King Date: Thu, 11 Jun 2026 06:11:56 GMT Subject: Re: [PATCH v2 3/3] doc: git-config: escape erroneous highlight markup Message-ID: <20260611061156.GC2187173@coredump.intra.peff.net> In-Reply-To: <20260610225513.6269-4-taahol@utu.fi> On Thu, Jun 11, 2026 at 01:55:13AM +0300, Tuomas Ahola wrote: > Paired octothorpes are used in AsciiDoc to mark highlighted text, > being the equivalent HTML tag. To use the symbol as a literal > character, it can be escaped with a backslash. > > Do so in git-config.adoc. I think this works OK, but in general I think most uses of backslash for metacharacters should consider using literal backticks. That shields it from the special meaning for asciidoc, but also will render it differently for the user (usually with a typewriter font, which becomes bold in roff output). Though curiously the case of `#` in git-fast-import seems not to get marked as in the html output (even though the nearby `LF` does). I wonder if there is some special treatment of `#` or something. > If __ 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