summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-09 11:34:18 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-09 11:34:18 +0200
commitcf658f4475bb22dbfaa365d53b4a3fd7e6140ec4 (patch)
treef78ff1b8da5f3a0a6cccc4bcc400311dd16d166a /cli
parent6528a32ad82e95015dea7cc5a2d98154717b12df (diff)
Add support for relative link targets
Now we only "recognize" the link target as man page if it contains '('.
Diffstat (limited to 'cli')
-rw-r--r--cli/context.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/cli/context.cxx b/cli/context.cxx
index cde5db8..ea84f33 100644
--- a/cli/context.cxx
+++ b/cli/context.cxx
@@ -645,16 +645,10 @@ format_line (output_type ot, string& r, const char* s, size_t n)
// See if link_target is a man page name/section.
//
- if (t.find (':') == string::npos) // No protocol.
- {
- size_t o (t.find ('('));
-
- if (o == string::npos)
- {
- cerr << "error: missing man section in '" << t << "'" << endl;
- throw generation_failed ();
- }
+ size_t o (t.find ('('));
+ if (o != string::npos)
+ {
link_section.assign (t, o + 1, t.size () - o - 2);
if (t[t.size () - 1] != ')' || link_section.empty ())