From 30c6ee64ab80154539c25ff8b8285aa5d568babf Mon Sep 17 00:00:00 2001 From: Atsushi Matsuo Date: Thu, 29 Aug 2024 06:09:34 +0900 Subject: [PATCH] Fix an issue that preventing the use of "extends:" to define the inheritance tree on Windows (#1056) --- src/Resource/ExtendsPlugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Resource/ExtendsPlugin.php b/src/Resource/ExtendsPlugin.php index acce54e2a..0f9c9de25 100644 --- a/src/Resource/ExtendsPlugin.php +++ b/src/Resource/ExtendsPlugin.php @@ -93,7 +93,11 @@ public function getContent(Source $source) */ public function getBasename(Source $source) { - return str_replace(':', '.', basename($source->getResourceName())); + $search = array(':'); + if (\Smarty\Smarty::$_IS_WINDOWS) { + $search = array(':', '|'); + } + return str_replace($search, '.', basename($source->getResourceName())); } /*