mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
8806120de6
In 2007 we added a custom header macro to provide version information7ef195ba3e
(Documentation: Add version information to man pages, 2007-03-25), However, in 2008 asciidoc added the attributes to do this properly [1]. This was not implemented in Git until 2019:226daba280
(Doc/Makefile: give mansource/-version/-manual attributes, 2019-09-16). But in 2023 we are doing it properly, so there's no need for the custom macro. [1] https://github.com/asciidoc-py/asciidoc-py/commit/ad78a3c Cc: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
59 lines
1.3 KiB
Text
59 lines
1.3 KiB
Text
## linkgit: macro
|
|
#
|
|
# Usage: linkgit:command[manpage-section]
|
|
#
|
|
# Note, {0} is the manpage section, while {target} is the command.
|
|
#
|
|
# Show Git link as: <command>(<section>); if section is defined, else just show
|
|
# the command.
|
|
|
|
[macros]
|
|
(?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
|
|
|
|
[attributes]
|
|
asterisk=*
|
|
plus=+
|
|
caret=^
|
|
startsb=[
|
|
endsb=]
|
|
backslash=\
|
|
tilde=~
|
|
apostrophe='
|
|
backtick=`
|
|
litdd=--
|
|
|
|
ifdef::backend-docbook[]
|
|
[linkgit-inlinemacro]
|
|
{0%{target}}
|
|
{0#<citerefentry>}
|
|
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
|
|
{0#</citerefentry>}
|
|
endif::backend-docbook[]
|
|
|
|
ifdef::backend-docbook[]
|
|
ifdef::doctype-manpage[]
|
|
# The following two small workarounds insert a simple paragraph after screen
|
|
[listingblock]
|
|
<example><title>{title}</title>
|
|
<literallayout class="monospaced">
|
|
|
|
|
</literallayout><simpara></simpara>
|
|
{title#}</example>
|
|
|
|
[verseblock]
|
|
<formalpara{id? id="{id}"}><title>{title}</title><para>
|
|
{title%}<literallayout{id? id="{id}"}>
|
|
{title#}<literallayout>
|
|
|
|
|
</literallayout>
|
|
{title#}</para></formalpara>
|
|
{title%}<simpara></simpara>
|
|
endif::doctype-manpage[]
|
|
endif::backend-docbook[]
|
|
|
|
ifdef::backend-xhtml11[]
|
|
[attributes]
|
|
git-relative-html-prefix=
|
|
[linkgit-inlinemacro]
|
|
<a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
|
|
endif::backend-xhtml11[]
|