git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Documentation: don't link to example mail addresses

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2012, 18:48 UTC
Message-ID
<7vd2y9rfxu.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121216140029.GE2725@river.lan>
John Keeping <john@keeping.me.uk> writes:
Show 31 quoted lines
> Email addresses in documentation are converted into mailto: hyperlinks
> in the HTML output and footnotes in man pages.  This isn't desirable for
> cases where the address is used as an example and is not valid.
>
> Particularly annoying is the example "jane@laptop.(none)" which appears
> in git-shortlog(1) as "jane@laptop[1].(none)", with note 1 saying:
>
> 	1. jane@laptop
> 	   mailto:jane@laptop
>
> Fix this by escaping these email addresses with a leading backslash, to
> prevent Asciidoc expanding them as inline macros.
>
> In the case of mailmap.txt, render the address monospaced so that it
> matches the block examples surrounding that paragraph.
>
> Helped-by: Jeff King <peff@peff.net>
> Signed-off-by: John Keeping <john@keeping.me.uk>
> ---
>
> On Sun, Dec 16, 2012 at 07:04:05AM -0500, Jeff King wrote:
>> Furthermore, the right way to suppress
>> expansion of macros is with a backslash escape.
> [snipped an example]
>> I think it's a little less ugly
>> than the "$$" quoting, but not by much. No clue if one is accepted by
>> more asciidoc versions or not.
>
> From a quick reading of the Asciidoc changelog, I think backslash
> escaping should be supported just as well as "$$" quoting, which leaves
> the minimal patch looking like this.

The patch looks reasonable to me, too. We were bitten by relying on the description in AsciiDoc documentation (which shows the state of their latest software) before; between the constructs that work, it is safer to use the older, more vanilla and more common one.

Thanks.
Previous: John KeepingNext: Junio C Hamano
Message 7 of 12 in “Documentation: don't link to example mail addresses”
  1. Documentation: don't link to example mail addressesJohn Keeping, Dec 15, 2012
  2. Jeff KingDec 15, 2012
  3. Junio C HamanoDec 15, 2012
  4. John KeepingDec 15, 2012
  5. Jeff KingDec 16, 2012
  6. Documentation: don't link to example mail addressesJohn Keeping, Dec 16, 2012
  7. Junio C HamanoDec 16, 2012
  8. Junio C HamanoDec 17, 2012
  9. Jeff KingDec 17, 2012
  10. Junio C HamanoDec 17, 2012
  11. Junio C HamanoDec 17, 2012
  12. John KeepingDec 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.