summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-19 08:32:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-19 08:32:25 +0200
commit248625ac8a5e200e6a86f5c27f60c20dc06c01a6 (patch)
tree752ba487b8954d94b2a274ef0800287b119a0b77
parent6280033ac4d3d3646c4c512a1c852c9c8f088f80 (diff)
Make \h text bold if using ANSI color
-rw-r--r--cli/context.cxx15
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;