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

Re: [PATCH] Documentation: rename gitlink macro to linkgit

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 3, 2008, 21:01 UTC
Message-ID
<7vejcypqsp.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<47767710.7040405@gmail.com>
Dan McGee <dpmcgee@gmail.com> writes:
Show 25 quoted lines
>>From 68bf426e810e732ff3f9f75ffcd69f777b538685 Mon Sep 17 00:00:00 2001
> From: Dan McGee <dpmcgee@gmail.com>
> Date: Sat, 29 Dec 2007 00:20:38 -0600
> Subject: [PATCH] Documentation: rename gitlink macro to linkgit
>
> Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock
> Asciidoc configuration:
>
> @@ -149,7 +153,10 @@
>  # Inline macros.
>  # Backslash prefix required for escape processing.
>  # (?s) re flag for line spanning.
> -(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
> +
> +# Explicit so they can be nested.
> +(?su)[\\]?(?P<name>(http|https|ftp|file|mailto|callto|image|link)):(?P<target>\S*?)(\[(?P<attrlist>.*?)\])=
> +
>  # Anchor: [[[id]]]. Bibliographic anchor.
>  (?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
>  # Anchor: [[id,xreflabel]]
>
> This default regex now matches explicit values, and unfortunately in this
> case gitlink was being matched by just 'link', causing the wrong inline
> macro template to be applied. By renaming the macro, we can avoid being
> matched by the wrong regex.

What's already tagged, released to the wild and picked up by distros cannot be taken back, so I'd most likely have to apply your patch anyway, but I have to say I am not very amused. I'd call this a regression on AsciiDoc's part.

I would have expected some courtesy to make sure that updates to AsciiDoc would not to break existing users, especially the ones that they use as the top advertising material in the "Projects using AsciiDoc" list at http://www.methods.co.nz/asciidoc/ ;-)

Stuart, is there anything we can help you to set up some automated tests to catch AsciiDoc regression, so we do not have to suffer like this again?

Previous: Dan McGeeNext: Yannick Gingras
Message 6 of 9 in “generated HTML contains broken links”
  1. Eric HanchrowDec 28, 2007
  2. Dan McGeeDec 29, 2007
  3. Miklos VajnaDec 29, 2007
  4. Dan McGeeDec 29, 2007
  5. Documentation: rename gitlink macro to linkgitDan McGee, Dec 29, 2007
  6. Junio C HamanoJan 3, 2008
  7. Yannick GingrasJan 4, 2008
  8. Junio C HamanoJan 4, 2008
  9. Yannick GingrasJan 4, 2008

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.