Skip to content

Commit 30c6ee6

Browse files
authored
Fix an issue that preventing the use of "extends:" to define the inheritance tree on Windows (#1056)
1 parent fd90f7e commit 30c6ee6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Resource/ExtendsPlugin.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ public function getContent(Source $source)
9393
*/
9494
public function getBasename(Source $source)
9595
{
96-
return str_replace(':', '.', basename($source->getResourceName()));
96+
$search = array(':');
97+
if (\Smarty\Smarty::$_IS_WINDOWS) {
98+
$search = array(':', '|');
99+
}
100+
return str_replace($search, '.', basename($source->getResourceName()));
97101
}
98102

99103
/*

0 commit comments

Comments
 (0)