From 2a14a2a0d17d14c529445e993c93a2aa04ebca18 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Mon, 11 Jul 2022 02:05:49 +0700 Subject: [PATCH] Fix json printing failing to print `MutableText` This is regarding an artifact left after text refactoring: when printing JSON text values, they were being converted into `Text`, which after refactoring always basically erased `MutableText` value, emptying it. --- sources/Text/JSON/JSONAPI.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Text/JSON/JSONAPI.uc b/sources/Text/JSON/JSONAPI.uc index 3f54c5a..7895440 100644 --- a/sources/Text/JSON/JSONAPI.uc +++ b/sources/Text/JSON/JSONAPI.uc @@ -1092,7 +1092,7 @@ public final function MutableText Print(AcediaObject toPrint) } if ( toPrint.class == class'Text' || toPrint.class == class'MutableText') { - return DisplayText(Text(toPrint)); + return DisplayText(BaseText(toPrint)); } if (toPrint.class == class'DynamicArray') { return PrintArray(DynamicArray(toPrint)); @@ -1530,7 +1530,7 @@ private final function MutableText PrettyPrintWithIndent( if ( toPrint.class == class'Text' || toPrint.class == class'MutableText') { - return DisplayText(Text(toPrint)).ChangeFormatting(jString); + return DisplayText(BaseText(toPrint)).ChangeFormatting(jString); } if (toPrint.class == class'DynamicArray') {