3 # Usage: linkgit:command[manpage-section]
5 # Note, {0} is the manpage section, while {target} is the command.
7 # Show Git link as: <command>(<section>); if section is defined, else just show
11 (?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
25 ifdef::backend-docbook[]
29 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
31 endif::backend-docbook[]
33 ifdef::backend-docbook[]
34 ifdef::doctype-manpage[]
35 # The following two small workarounds insert a simple paragraph after screen
37 <example><title>{title}</title>
38 <literallayout class="monospaced">
40 </literallayout><simpara></simpara>
44 <formalpara{id? id="{id}"}><title>{title}</title><para>
45 {title%}<literallayout{id? id="{id}"}>
46 {title#}<literallayout>
49 {title#}</para></formalpara>
50 {title%}<simpara></simpara>
51 endif::doctype-manpage[]
52 endif::backend-docbook[]
54 ifdef::backend-xhtml11[]
56 git-relative-html-prefix=
58 <a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
59 endif::backend-xhtml11[]