summaryrefslogtreecommitdiff
path: root/cli/cli/man.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cli/cli/man.cxx')
-rw-r--r--cli/cli/man.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/cli/cli/man.cxx b/cli/cli/man.cxx
index df703e8..d446b2a 100644
--- a/cli/cli/man.cxx
+++ b/cli/cli/man.cxx
@@ -91,13 +91,16 @@ namespace
// n > 2 - arg string, short string, long string
//
size_t n (ds.size ());
- const string& d (
+ string d (
n == 1
? (cd_ == cd_short ? first_sentence (ds[0]) : ds[0])
: (n == 2
? (cd_ == cd_short ? first_sentence (ds[1]) : ds[1])
: ds[cd_ == cd_short ? 1 : 2]));
+ if (options.ascii_tree ())
+ preprocess_ascii_tree (d);
+
std::set<string> arg_set;
if (n > 1)
translate_arg (ds[0], arg_set);
@@ -149,6 +152,8 @@ namespace
if (type != "bool" || doc.size () >= 3)
{
+ // Note: we naturally assume this doesn't need --ascii-tree treatment.
+ //
string s (
translate_arg (
doc.size () > 0 ? doc[0] : string ("<arg>"), arg_set));
@@ -174,6 +179,9 @@ namespace
d = (cd_ == cd_short ? first_sentence (doc[1]) : doc[1]);
}
+ if (options.ascii_tree ())
+ preprocess_ascii_tree (d);
+
// Format the documentation string.
//
d = format (o.scope (), translate (d, arg_set), false);