diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-19 08:32:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-11-19 08:32:25 +0200 |
commit | 248625ac8a5e200e6a86f5c27f60c20dc06c01a6 (patch) | |
tree | 752ba487b8954d94b2a274ef0800287b119a0b77 /cli/context.cxx | |
parent | 6280033ac4d3d3646c4c512a1c852c9c8f088f80 (diff) |
Make \h text bold if using ANSI color
Diffstat (limited to 'cli/context.cxx')
-rw-r--r-- | cli/context.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/cli/context.cxx b/cli/context.cxx index 7459406..a014824 100644 --- a/cli/context.cxx +++ b/cli/context.cxx @@ -1267,7 +1267,20 @@ format (output_type ot, string const& s, bool para) switch (pb.kind) { - case block::h: v += dn + pv; break; + case block::h: + { + v += dn; + + if (options.ansi_color ()) + v += "\033[1m"; // Bold. + + v += pv; + + if (options.ansi_color ()) + v += "\033[0m"; + + break; + } case block::ul: case block::ol: case block::dl: v += dn + pv; break; |