Work around em-dash handling in newer AsciiDoc
[git/jnareb-git/bp-gitweb.git] / Documentation / asciidoc.conf
blob3267bae9da46ffa6e511c3bf36387bf5a85e6440
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 tilde=&#126;
20 backtick=&#96;
21 litdd=&#45;&#45;
23 ifdef::backend-docbook[]
24 [linkgit-inlinemacro]
25 {0%{target}}
26 {0#<citerefentry>}
27 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
28 {0#</citerefentry>}
29 endif::backend-docbook[]
31 ifdef::backend-docbook[]
32 ifndef::git-asciidoc-no-roff[]
33 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
34 # v1.72 breaks with this because it replaces dots not in roff requests.
35 [listingblock]
36 <example><title>{title}</title>
37 <literallayout>
38 ifdef::doctype-manpage[]
39 &#10;.ft C&#10;
40 endif::doctype-manpage[]
42 ifdef::doctype-manpage[]
43 &#10;.ft&#10;
44 endif::doctype-manpage[]
45 </literallayout>
46 {title#}</example>
47 endif::git-asciidoc-no-roff[]
49 ifdef::git-asciidoc-no-roff[]
50 ifdef::doctype-manpage[]
51 # The following two small workarounds insert a simple paragraph after screen
52 [listingblock]
53 <example><title>{title}</title>
54 <literallayout>
56 </literallayout><simpara></simpara>
57 {title#}</example>
59 [verseblock]
60 <formalpara{id? id="{id}"}><title>{title}</title><para>
61 {title%}<literallayout{id? id="{id}"}>
62 {title#}<literallayout>
64 </literallayout>
65 {title#}</para></formalpara>
66 {title%}<simpara></simpara>
67 endif::doctype-manpage[]
68 endif::git-asciidoc-no-roff[]
69 endif::backend-docbook[]
71 ifdef::doctype-manpage[]
72 ifdef::backend-docbook[]
73 [header]
74 template::[header-declarations]
75 <refentry>
76 <refmeta>
77 <refentrytitle>{mantitle}</refentrytitle>
78 <manvolnum>{manvolnum}</manvolnum>
79 <refmiscinfo class="source">Git</refmiscinfo>
80 <refmiscinfo class="version">{git_version}</refmiscinfo>
81 <refmiscinfo class="manual">Git Manual</refmiscinfo>
82 </refmeta>
83 <refnamediv>
84   <refname>{manname}</refname>
85   <refpurpose>{manpurpose}</refpurpose>
86 </refnamediv>
87 endif::backend-docbook[]
88 endif::doctype-manpage[]
90 ifdef::backend-xhtml11[]
91 [linkgit-inlinemacro]
92 <a href="{target}.html">{target}{0?({0})}</a>
93 endif::backend-xhtml11[]