diff --git a/src/Builder.php b/src/Builder.php index 86e99bf..0cd11c5 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -247,7 +247,14 @@ protected static function putFile($path, $content) */ public function substituteOutputDirs($data) { - return static::substitutePaths($data, dirname(dirname(dirname($this->outputDir))), static::BASE_DIR_MARKER); + $dir = static::normalizePath(dirname(dirname(dirname($this->outputDir)))); + + return static::substitutePaths($data, $dir, static::BASE_DIR_MARKER); + } + + public static function normalizePath($path, $ds = DIRECTORY_SEPARATOR) + { + return rtrim(strtr($path, '/\\', $ds . $ds), $ds); } /**