Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: sdk/lib/_internal/pub/lib/src/log.dart

Issue 347863006: Stop gray text from making everything bold. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/log.dart
diff --git a/sdk/lib/_internal/pub/lib/src/log.dart b/sdk/lib/_internal/pub/lib/src/log.dart
index eaf873202838cbb3043ecb35117bb3147afdab63..0c10d6cc20bc99ac63f93f2fc5c7550f01a1295f 100644
--- a/sdk/lib/_internal/pub/lib/src/log.dart
+++ b/sdk/lib/_internal/pub/lib/src/log.dart
@@ -361,7 +361,11 @@ String bold(text) => withPrejudice ? text : "$_bold$text$_none";
/// that supports that.
///
/// Use this for text that's less important than the text around it.
-String gray(text) => "$_gray$text$_noColor";
+///
+/// The gray marker also enables bold, so it needs to be handled specially with
+/// [withPrejudice] to avoid disabling bolding entirely.
+String gray(text) =>
+ withPrejudice ? "$_gray$text$_noColor" : "$_gray$text$_none";
/// Wraps [text] in the ANSI escape codes to color it cyan when on a platform
/// that supports that.
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698