From 46e30536c4e74855fc18b81c7154410b5e0a0083 Mon Sep 17 00:00:00 2001 From: Jacek Pazera Date: Fri, 5 Aug 2022 23:38:20 +0200 Subject: [PATCH] ConsoleApp: proc. DisplayTaggedText - strip color tags when FUseColors = False --- Base/JPL.ConsoleApp.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Base/JPL.ConsoleApp.pas b/Base/JPL.ConsoleApp.pas index 9b3b25f..a249a9a 100644 --- a/Base/JPL.ConsoleApp.pas +++ b/Base/JPL.ConsoleApp.pas @@ -386,9 +386,11 @@ procedure TJPConsoleApp.DisplayTaggedText(const TaggedText: string); i: integer; s: string; begin + if Trim(TaggedText) = '' then Exit; + if not FUseColors then begin - Write(TaggedText); // ToDo: Dodać usuwanie znaczników + Write(StripColorTags(TaggedText)); // Done: Dodać usuwanie znaczników Exit; end;