Skip to content

Commit 53f81f0

Browse files
committed
feat: TextFormatter#enableSequences disabled if NO_COLOR is present
1 parent 6cc4f84 commit 53f81f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/textFormatter/TextFormatter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import java.util.List;
1111

1212
/**
13-
* Allows to easily format text for display in a terminal.
13+
* Allows easily formatting of text for it to be displayed in a terminal.
1414
* <p>
1515
* Multiple formatters can be concatenated together. This is useful for when you want to
1616
* format a string that has multiple parts that need to be formatted differently.
@@ -21,7 +21,7 @@ public class TextFormatter {
2121
* When set to {@code false}, no formatting will be applied to text. Raw text will be generated without any
2222
* color or formatting.
2323
*/
24-
public static boolean enableSequences = true;
24+
public static boolean enableSequences = !TextFormatter.getNoColorEnvironment();
2525

2626
/**
2727
* The default color that should be used when no foreground color is specified (if {@link #startWithDefaultColorIfNotDefined}

0 commit comments

Comments
 (0)