From c3aca531f13fba58c4774b8af5db0f98388cbe50 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Fri, 17 Jun 2022 20:25:12 +0700 Subject: [PATCH] Change Commands to parse input `Text` as plain --- sources/Commands/CommandParser.uc | 4 ++-- sources/Commands/Tests/TEST_Command.uc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/Commands/CommandParser.uc b/sources/Commands/CommandParser.uc index c0ff2bd..702ac78 100644 --- a/sources/Commands/CommandParser.uc +++ b/sources/Commands/CommandParser.uc @@ -556,7 +556,7 @@ private final function bool ParseTextValue( return false; } RecordParameter(parsedParameters, expectedParameter, - _.text.FromFormattedString(textValue)); + _.text.FromString(textValue)); return true; } @@ -575,7 +575,7 @@ private final function bool ParseRemainderValue( return false; } RecordParameter(parsedParameters, expectedParameter, - _.text.FromFormattedString(textValue)); + _.text.FromString(textValue)); return true; } diff --git a/sources/Commands/Tests/TEST_Command.uc b/sources/Commands/Tests/TEST_Command.uc index a7caf68..243dc8d 100644 --- a/sources/Commands/Tests/TEST_Command.uc +++ b/sources/Commands/Tests/TEST_Command.uc @@ -279,8 +279,8 @@ protected static function SubTest_MockAQ3() TEST_ExpectTrue(paramArray.GetLength() == 3); TEST_ExpectTrue(Text(paramArray.GetItem(0)).ToString() == "dk"); TEST_ExpectTrue(Text(paramArray.GetItem(1)).ToString() == "someone"); - TEST_ExpectTrue( Text(paramArray.GetItem(2)).ToFormattedString() - == "complex {rgb(123,45,72) string}"); + TEST_ExpectTrue( Text(paramArray.GetItem(2)).ToString() + == "complex {#7b2d48 string}"); } protected static function SubTest_MockAQ4()