Sync with 'maint'
[git.git] / Documentation / asciidoc.conf
blobf6da6d1fbd2b208b072c1158dfcfb29c6c01f93a
1 ## linkgit: macro
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
8 # the command.
10 [macros]
11 (?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
13 [attributes]
14 asterisk=&#42;
15 plus=&#43;
16 caret=&#94;
17 startsb=&#91;
18 endsb=&#93;
19 backslash=&#92;
20 tilde=&#126;
21 apostrophe=&#39;
22 backtick=&#96;
23 litdd=&#45;&#45;
25 ifdef::backend-docbook[]
26 [linkgit-inlinemacro]
27 {0%{target}}
28 {0#<citerefentry>}
29 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
30 {0#</citerefentry>}
32 [literal-inlinemacro]
33 {eval:re.sub(r'(&lt;[-a-zA-Z0-9.]+&gt;)', r'<emphasis>\1</emphasis>', re.sub(r'([\[\s|()>]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1<literal>\2</literal>', re.sub(r'(\.\.\.?)([^\]$.])', r'<literal>\1</literal>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))}
35 endif::backend-docbook[]
37 ifdef::backend-docbook[]
38 ifdef::doctype-manpage[]
39 # The following two small workarounds insert a simple paragraph after screen
40 [listingblock]
41 <example><title>{title}</title>
42 <literallayout class="monospaced">
44 </literallayout><simpara></simpara>
45 {title#}</example>
47 [verseblock]
48 <formalpara{id? id="{id}"}><title>{title}</title><para>
49 {title%}<literallayout{id? id="{id}"}>
50 {title#}<literallayout>
52 </literallayout>
53 {title#}</para></formalpara>
54 {title%}<simpara></simpara>
55 endif::doctype-manpage[]
56 endif::backend-docbook[]
58 ifdef::backend-xhtml11[]
59 [attributes]
60 git-relative-html-prefix=
61 [linkgit-inlinemacro]
62 <a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
64 [literal-inlinemacro]
65 {eval:re.sub(r'(&lt;[-a-zA-Z0-9.]+&gt;)', r'<em>\1</em>', re.sub(r'([\[\s|()>]|^|\]|&gt;)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1<code>\2</code>', re.sub(r'(\.\.\.?)([^\]$.])', r'<code>\1</code>\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))}
67 endif::backend-xhtml11[]
69 ifdef::backend-docbook[]
70 ifdef::doctype-manpage[]
71 [paradef-default]
72 synopsis-style=template="verseparagraph",filter="sed 's!&#8230;\\(\\]\\|$\\)!<phrase>\\0</phrase>!g;s!\\([\\[ |()]\\|^\\|\\]\\|&gt;\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.]\\+\\|&#8230;\\)!\\1<literal>\\2</literal>!g;s!&lt;[-a-zA-Z0-9.]\\+&gt;!<emphasis>\\0</emphasis>!g'"
73 endif::doctype-manpage[]
74 endif::backend-docbook[]
76 ifdef::backend-xhtml11[]
77 [paradef-default]
78 synopsis-style=template="verseparagraph",filter="sed 's!&#8230;\\(\\]\\|$\\)!<span>\\0</span>!g;s!\\([\\[ |()]\\|^\\|\\]\\|&gt;\\)\\([-=a-zA-Z0-9:+@,\\/_^\\$.]\\+\\|&#8230;\\)!\\1<code>\\2</code>!g;s!&lt;[-a-zA-Z0-9.]\\+&gt;!<em>\\0</em>!g'"
79 endif::backend-xhtml11[]