diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-11-09 13:01:13 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-11-09 13:01:13 +0200 |
commit | cd3758bb328ff425bb06f18c81d3c353b508a336 (patch) | |
tree | ed8a85f7c01fa83852bb6d51e4fc2dd2a268b388 /cli/cli/source.cxx | |
parent | 9944c0e901d370316fe55fb845ad1c3c6721038d (diff) |
Add --ascii-tree for translating UTF-8 tree(1) output to ASCII
Diffstat (limited to 'cli/cli/source.cxx')
-rw-r--r-- | cli/cli/source.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/cli/source.cxx b/cli/cli/source.cxx index b6df839..1b9e832 100644 --- a/cli/cli/source.cxx +++ b/cli/cli/source.cxx @@ -278,6 +278,9 @@ namespace : (n == 1 ? ds[0] : ds[1]); // Else, use common (no first sentence). } + if (options.ascii_tree ()) + preprocess_ascii_tree (d); + std::set<string> arg_set; if (n > 1 && options.ansi_color ()) translate_arg (ds[0], arg_set); @@ -345,6 +348,8 @@ namespace { l++; // ' ' seperator + // Note: we naturally assume this doesn't need --ascii-tree treatment. + // string s (doc.size () > 0 ? doc[0] : string ("<arg>")); if (options.ansi_color ()) @@ -439,6 +444,8 @@ namespace os << ' '; l++; + // Note: we naturally assume this doesn't need --ascii-tree treatment. + // string s (doc.size () > 0 ? doc[0] : string ("<arg>")); if (color) @@ -475,6 +482,9 @@ namespace } } + if (options.ascii_tree ()) + preprocess_ascii_tree (d); + // Format the documentation string. // if (color) |