summaryrefslogtreecommitdiff
path: root/cli/cli/html.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cli/cli/html.cxx')
-rw-r--r--cli/cli/html.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/cli/cli/html.cxx b/cli/cli/html.cxx
index b374b91..48eb5e3 100644
--- a/cli/cli/html.cxx
+++ b/cli/cli/html.cxx
@@ -127,13 +127,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);
@@ -211,6 +214,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));
@@ -236,6 +241,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 (), escape_html (translate (d, arg_set)), false);