Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:02

Dan McGee [off-list ref] writes:
quoted hunk
quoted
From 68bf426e810e732ff3f9f75ffcd69f777b538685 Mon Sep 17 00:00:00 2001
From: Dan McGee <redacted>
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help