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

From: Junio C Hamano <[email-masked]>
Date: Thu, 03 Jan 2008 13:01:10 -0800

Dan McGee <[email-masked]> writes:

>>>From 68bf426e810e732ff3f9f75ffcd69f777b538685 Mon Sep 17 00:00:00 2001
> From: Dan McGee <[email-masked]>
> 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?