Fix broken sample links on windows due to $baseDir having backslash (#653)
This commit is contained in:
parent
a98d885830
commit
9fa8a02fe3
|
@ -82,7 +82,7 @@ class Sample
|
|||
|
||||
$files = [];
|
||||
foreach ($regex as $file) {
|
||||
$file = str_replace($baseDir . '/', '', $file[0]);
|
||||
$file = str_replace(str_replace('\\', '/', $baseDir) . '/', '', str_replace('\\', '/', $file[0]));
|
||||
$info = pathinfo($file);
|
||||
$category = str_replace('_', ' ', $info['dirname']);
|
||||
$name = str_replace('_', ' ', preg_replace('/(|\.php)/', '', $info['filename']));
|
||||
|
|
Loading…
Reference in New Issue