Chromium Code Reviews| Index: doc/asciidoc.conf |
| diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf |
| index 85df624fd219b5164ea4d9fa8a40872aeb77ada5..ab330b34cb9c14da47c7257a2c17df02bfcd44a3 100644 |
| --- a/doc/asciidoc.conf |
| +++ b/doc/asciidoc.conf |
| @@ -29,3 +29,25 @@ ifdef::basebackend-html[] |
| {mansource=Version} {manversion={revnumber}}{basebackend-xhtml11?<br />}{basebackend-xhtml11=<br>} |
| Last updated {revdate} |
| endif::basebackend-html[] |
| + |
| +# The man_link macro was inspired by git’s linkgit macro. See |
|
Robert Sesek
2015/03/18 20:43:36
I'll take your word for it that this works. I don'
|
| +# https://github.com/git/git/blob/master/Documentation/asciidoc.conf. |
| +ifdef::doctype-manpage[] |
| + |
| +[macros] |
| +(?su)[\\]?(?P<name>man_link):(?P<target>\S*?)\[(?P<attrlist>.*?)\]= |
| + |
| +ifdef::backend-docbook[] |
| +[man_link-inlinemacro] |
| +{0%{target}} |
| +{0#<citerefentry>} |
| +{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>} |
| +{0#</citerefentry>} |
| +endif::backend-docbook[] |
| + |
| +ifdef::basebackend-html[] |
| +[man_link-inlinemacro] |
| +<a href="{target}.html">{target}{0?({0})}</a> |
| +endif::basebackend-html[] |
| + |
| +endif::doctype-manpage[] |