diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-31 07:53:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-01-31 07:53:54 +0200 |
commit | de673d0b39bff8d8da3d3818de7c79bf0143eb2c (patch) | |
tree | 36cc9423cadb125ad0e0c3d60b6a1b1f4904964f | |
parent | 602c3509b614c5667d17cafa750c85a8b8862eab (diff) |
Include (1) in foo(1) into bold
-rw-r--r-- | cli/context.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/cli/context.cxx b/cli/context.cxx index 11c9ecf..506c8fa 100644 --- a/cli/context.cxx +++ b/cli/context.cxx @@ -799,12 +799,10 @@ format_line (output_type ot, string& r, const char* s, size_t n) if (color) r += "\033[1m"; - r += link_target; + r += link_target + "(" + link_section + ")"; if (color) r += "\033[0m"; - - r += "(" + link_section + ")"; } if (!link_empty) @@ -840,10 +838,9 @@ format_line (output_type ot, string& r, const char* s, size_t n) r += link_target; else { - r += "<code>"; - r += "<b>" + link_target + "</b>"; - r += "(" + link_section + ")"; - r += "</code>"; + r += "<code><b>"; + r += link_target + "(" + link_section + ")"; + r += "</b></code>"; } } @@ -873,10 +870,7 @@ format_line (output_type ot, string& r, const char* s, size_t n) if (link_section.empty ()) r += link_target; else - { - r += "\\fB" + link_target + "\\fP"; - r += "(" + link_section + ")"; - } + r += "\\fB" + link_target + "(" + link_section + ")\\fP"; if (!link_empty) r += ")"; |