Skip to content

Commit

Permalink
Remove ANSI codes from GUI log
Browse files Browse the repository at this point in the history
  • Loading branch information
mica-alex committed Jun 8, 2023
1 parent 66cfafa commit d4d82e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/me/cortex/jarscanner/Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ private static void createAndDisplayGui() {
// Run scan
try {
Main.run(4, searchDir, true, out -> {
textArea.append(out + "\n");
String processedOut = out.replace(Constants.ANSI_RED, "").replace(Constants.ANSI_GREEN, "").replace(Constants.ANSI_WHITE, "").replace(Constants.ANSI_RESET, "");
textArea.append(processedOut + "\n");
// Scroll to bottom of text area if auto-scroll is enabled
if (autoScrollCheckBox.isSelected()) {
textArea.setCaretPosition(textArea.getDocument().getLength());
Expand Down

0 comments on commit d4d82e4

Please sign in to comment.