Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3450)

Unified Diff: doc/asciidoc.conf

Issue 1018023002: Allow man pages to link to each other (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@doc_script
Patch Set: Rebase Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | doc/generate_asciidoc.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+# 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[]
« no previous file with comments | « no previous file | doc/generate_asciidoc.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698