From 5128833a6292ebb95a3e5ca0625aeac39f87012e Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 31 Dec 2020 12:02:43 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02677=20-=20Add=20style=20definition=20fo?= =?UTF-8?q?r=20enums=20(fix=20CI)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/compiler.class.inc.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index 56e995bc3..45f83b21b 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -1348,7 +1348,7 @@ EOF $sMainColor = $this->GetMandatoryPropString($oStyleNode, 'main_color'); $sComplementaryColor = $this->GetMandatoryPropString($oStyleNode, 'complementary_color'); $sDecorationClasses = $this->GetPropString($oStyleNode, 'decoration_classes', ''); - $aValues[] = $sCode; + $aValues[] = self::RemoveSurroundingQuotes($sCode); $aStyledValues[] = "$sCode => new ormStyle($sMainColor, $sComplementaryColor, $sDecorationClasses)"; } $sValues = '"'.implode(',', $aValues).'"'; @@ -3260,4 +3260,14 @@ XML; EOF; $this->WriteFile($sResultFile, $sFileHeader.$sCompiledCode); } + + private static function RemoveSurroundingQuotes($sValue) + { + if (utils::StartsWith($sValue, '\'') && utils::EndsWith($sValue, '\'')) + { + $sValue = substr($sValue, 1, -1); + } + + return $sValue; + } }