# [PATCH] Define linkgit macro in [macros] section

3 messages from 2008-12-08 to 2008-12-09. Participants: Alexey Borzenkov, Junio C Hamano.
Thread: https://gitlist.dev/t/16637

## Alexey Borzenkov, 2008-12-08 18:29

Subject: [PATCH] Define linkgit macro in [macros] section
Message-ID: <e2480c70812081029s36eac963t76092c09af990ad@mail.gmail.com>
URL: https://gitlist.dev/e/e2480c70812081029s36eac963t76092c09af990ad%40mail.gmail.com

```
Starting with asciidoc 8.3.0 linkgit macro is no longer recognized by
asciidoc and user guide suggests
(http://www.methods.co.nz/asciidoc/userguide.html#_macro_definitions)
that macros are supposed to be defined in [macros] section. I'm not
sure whether undefined linkgit macro was working by pure chance or it
is a regression in asciidoc 8.3.0, but this patch adds proper
definition for the linkgit macro, allowing it to work on 8.3.0.

Signed-off-by: Alexey Borzenkov <snaury@gmail.com>
---
 Documentation/asciidoc.conf |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 2da867d..1e735df 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -7,6 +7,9 @@
 # Show GIT link as: <command>(<section>); if section is defined, else just show
 # the command.

+[macros]
+(?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
+
 [attributes]
 asterisk=&#42;
 plus=&#43;
-- 
1.6.0.4

```

## Alexey Borzenkov, 2008-12-08 20:13

Subject: Re: [PATCH] Define linkgit macro in [macros] section
Message-ID: <loom.20081208T201048-954@post.gmane.org>
URL: https://gitlist.dev/e/loom.20081208T201048-954%40post.gmane.org
In-Reply-To: <e2480c70812081029s36eac963t76092c09af990ad@mail.gmail.com>

```
Alexey Borzenkov <snaury <at> gmail.com> writes:

> I'm not sure whether undefined linkgit macro was working by pure chance
> or it is a regression in asciidoc 8.3.0,

I now found that the change in question was made in
http://hg.sharesource.org/asciidoc/rev/82bdfd1a3674 and "catchall" macro is now
commented out by default, all the more reason for git to define linkgit macro
properly.

```

## Junio C Hamano, 2008-12-09 01:26

Subject: Re: [PATCH] Define linkgit macro in [macros] section
Message-ID: <7vvdtu5ebj.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vvdtu5ebj.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <loom.20081208T201048-954@post.gmane.org>

```
Thanks, and it does not change the output with older version (at least
7.1.2, I'll try with the one they have at k.org later tonight) in any
negative way.

Will apply.

```
