interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / asciidoc.conf.in

104 lines · 4217 bytes Raw Blame History
1## linkgit: macro
2#
3# Usage: linkgit:command[manpage-section]
4#
5# Note, {0} is the manpage section, while {target} is the command.
6#
7# Show Git link as: <command>(<section>); if section is defined, else just show
8# the command.
9
10[macros]
11(?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
12
13[attributes]
14asterisk=&#42;
15plus=&#43;
16caret=&#94;
17startsb=&#91;
18endsb=&#93;
19backslash=&#92;
20tilde=&#126;
21apostrophe=&#39;
22backtick=&#96;
23litdd=&#45;&#45;
24manmanual=Git Manual
25mansource=Git @GIT_VERSION@
26revdate=@GIT_DATE@
27
28ifdef::doctype-book[]
29[titles]
30 underlines="__","==","--","~~","^^"
31endif::doctype-book[]
32
33ifdef::backend-docbook[]
34[linkgit-inlinemacro]
35ifndef::doctype-book[]
36{0%{target}}
37{0#<citerefentry>}
38{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
39{0#</citerefentry>}
40endif::doctype-book[]
41ifdef::doctype-book[]
42<ulink url="{target}.html">{target}{0?({0})}</ulink>
43endif::doctype-book[]
44
45[literal-inlinemacro]
46{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])))}
47
48endif::backend-docbook[]
49
50ifdef::backend-docbook[]
51ifdef::doctype-manpage[]
52# The following two small workarounds insert a simple paragraph after screen
53[listingblock]
54<example><title>{title}</title>
55<literallayout class="monospaced">
56|
57</literallayout><simpara></simpara>
58{title#}</example>
59
60[verseblock]
61<formalpara{id? id="{id}"}><title>{title}</title><para>
62{title%}<literallayout{id? id="{id}"}>
63{title#}<literallayout>
64|
65</literallayout>
66{title#}</para></formalpara>
67{title%}<simpara></simpara>
68endif::doctype-manpage[]
69endif::backend-docbook[]
70
71ifdef::backend-xhtml11[]
72[attributes]
73git-relative-html-prefix=
74[linkgit-inlinemacro]
75<a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
76
77[literal-inlinemacro]
78{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])))}
79
80endif::backend-xhtml11[]
81
82ifdef::backend-docbook[]
83ifdef::doctype-manpage[]
84[blockdef-open]
85synopsis-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'"
86
87[blockdef-listing]
88synopsis-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'"
89
90[paradef-default]
91synopsis-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'"
92endif::doctype-manpage[]
93endif::backend-docbook[]
94
95ifdef::backend-xhtml11[]
96[blockdef-open]
97synopsis-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'"
98
99[blockdef-listing]
100synopsis-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'"
101
102[paradef-default]
103synopsis-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'"
104endif::backend-xhtml11[]