Skip to content

Commit

Permalink
remove TextFormatter#ESC to now use UtlString#ESCAPE_CHAR
Browse files Browse the repository at this point in the history
  • Loading branch information
darvil82 committed Mar 25, 2024
1 parent e86dc5e commit 615696a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {
}

group = "com.darvil"
version = "2.2.0"
version = "2.2.0b"
description = "Text formatting utilities to easily format text on the terminal for Java."

dependencies {
implementation("com.darvil:utils:0.6.1")
implementation("com.darvil:utils:0.6.1b")

implementation("org.jetbrains:annotations:24.0.0")
testImplementation(platform("org.junit:junit-bom:5.9.1"))
Expand All @@ -24,6 +24,7 @@ java {

repositories {
mavenCentral()
mavenLocal()
maven("https://repsy.io/mvn/darvil/java")
}

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/textFormatter/TextFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.jetbrains.annotations.Nullable;
import textFormatter.color.Color;
import textFormatter.color.SimpleColor;
import utils.UtlString;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -390,7 +391,7 @@ else if (TextFormatter.startWithDefaultColorIfNotDefined && this.parent == null)

if (TextFormatter.debug)
return "ESC[" + joined + "]";
return "" + ESC + '[' + joined + 'm';
return "" + UtlString.ESCAPE_CHAR + '[' + joined + 'm';
}

/**
Expand All @@ -402,9 +403,4 @@ else if (TextFormatter.startWithDefaultColorIfNotDefined && this.parent == null)
public static boolean isColorDisabledEnv() {
return System.getenv("NO_COLOR") != null;
}

/**
* Escape character which represents the start of a terminal sequence
*/
public static final char ESC = '\u001B';
}

0 comments on commit 615696a

Please sign in to comment.