Fix an issue that preventing the use of "extends:" to define the inheritance tree on Windows (#1056)

This commit is contained in:
Atsushi Matsuo
2024-08-29 06:09:34 +09:00
committed by GitHub
parent fd90f7eac9
commit 30c6ee64ab

View File

@ -93,7 +93,11 @@ class ExtendsPlugin extends BasePlugin
*/
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()));
}
/*