From cf658f4475bb22dbfaa365d53b4a3fd7e6140ec4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 9 Feb 2016 11:34:18 +0200 Subject: Add support for relative link targets Now we only "recognize" the link target as man page if it contains '('. --- cli/context.cxx | 12 +++--------- 1 file 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 ()) -- cgit v1.1