Documentation: remove Asciidoctor linkgit macro

Asciidoctor provides an extension implementing a backend-independent macro for dealing with manpage links just like the linkgit macro. As this is more likely to be up-to-date with future changes in Asciidoctor, prefer using it over reimplementing in Git. This reverts commit 773ee47c2b9c691d9758b2bea6cac10e3f0c4e12. Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Oct 27, 2014 at 00:13 UTC c6c3e0db842c0c3649de27edd28f8a6975bee105
1 file changed -39
Documentation/extensions.rb deleted
-39
@@ -1,39 +0,0 @@
1 -require 'asciidoctor'
2 -require 'asciidoctor/extensions'
3 -
4 -module Git
5 - module Documentation
6 - class LinkGitProcessor < Asciidoctor::Extensions::InlineMacroProcessor
7 - use_dsl
8 -
9 - named :chrome
10 -
11 - def process(parent, target, attrs)
12 - if parent.document.basebackend? 'html'
13 - generate_html(parent, target, attrs)
14 - elsif parent.document.basebackend? 'docbook'
15 - generate_docbook(parent, target, attrs)
16 - end
17 - end
18 -
19 - private
20 -
21 - def generate_html(parent, target, attrs)
22 - section = attrs.has_key?(1) ? "(#{attrs[1]})" : ''
23 - prefix = parent.document.attr('git-relative-html-prefix') || ''
24 - %(<a href="#{prefix}#{target}.html">#{target}#{section}</a>\n)
25 - end
26 -
27 - def generate_docbook(parent, target, attrs)
28 - %(<citerefentry>
29 -<refentrytitle>#{target}</refentrytitle><manvolnum>#{attrs[1]}</manvolnum>
30 -</citerefentry>
31 -)
32 - end
33 - end
34 - end
35 -end
36 -
37 -Asciidoctor::Extensions.register do
38 - inline_macro Git::Documentation::LinkGitProcessor, :linkgit
39 -end