Documentation: unbreak regex in show-ref manual
[git/dkf.git] / Documentation / asciidoc.conf
blobb5f0f29d1f736f2e6a0c544d682b973b95420191
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;
24 ifdef::backend-docbook[]
25 [linkgit-inlinemacro]
26 {0%{target}}
27 {0#<citerefentry>}
28 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
29 {0#</citerefentry>}
30 endif::backend-docbook[]
32 ifdef::backend-docbook[]
33 ifndef::git-asciidoc-no-roff[]
34 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
35 # v1.72 breaks with this because it replaces dots not in roff requests.
36 [listingblock]
37 <example><title>{title}</title>
38 <literallayout>
39 ifdef::doctype-manpage[]
40 &#10;.ft C&#10;
41 endif::doctype-manpage[]
43 ifdef::doctype-manpage[]
44 &#10;.ft&#10;
45 endif::doctype-manpage[]
46 </literallayout>
47 {title#}</example>
48 endif::git-asciidoc-no-roff[]
50 ifdef::git-asciidoc-no-roff[]
51 ifdef::doctype-manpage[]
52 # The following two small workarounds insert a simple paragraph after screen
53 [listingblock]
54 <example><title>{title}</title>
55 <literallayout>
57 </literallayout><simpara></simpara>
58 {title#}</example>
60 [verseblock]
61 <formalpara{id? id="{id}"}><title>{title}</title><para>
62 {title%}<literallayout{id? id="{id}"}>
63 {title#}<literallayout>
65 </literallayout>
66 {title#}</para></formalpara>
67 {title%}<simpara></simpara>
68 endif::doctype-manpage[]
69 endif::git-asciidoc-no-roff[]
70 endif::backend-docbook[]
72 ifdef::doctype-manpage[]
73 ifdef::backend-docbook[]
74 [header]
75 template::[header-declarations]
76 <refentry>
77 <refmeta>
78 <refentrytitle>{mantitle}</refentrytitle>
79 <manvolnum>{manvolnum}</manvolnum>
80 <refmiscinfo class="source">Git</refmiscinfo>
81 <refmiscinfo class="version">{git_version}</refmiscinfo>
82 <refmiscinfo class="manual">Git Manual</refmiscinfo>
83 </refmeta>
84 <refnamediv>
85   <refname>{manname}</refname>
86   <refpurpose>{manpurpose}</refpurpose>
87 </refnamediv>
88 endif::backend-docbook[]
89 endif::doctype-manpage[]
91 ifdef::backend-xhtml11[]
92 [linkgit-inlinemacro]
93 <a href="{target}.html">{target}{0?({0})}</a>
94 endif::backend-xhtml11[]