@@ -507,6 +507,7 @@ protected function gatherPatternInfo() {
507
507
$ patternType = "" ;
508
508
$ patternSubtype = "" ;
509
509
$ patternSubtypeSet = false ;
510
+ $ dirSep = DIRECTORY_SEPARATOR ;
510
511
511
512
// initialize various arrays
512
513
$ this ->navItems = array ();
@@ -524,7 +525,7 @@ protected function gatherPatternInfo() {
524
525
foreach ($ patternObjects as $ name => $ object ) {
525
526
526
527
$ name = str_replace (__DIR__ .$ this ->sp ,"" ,$ name );
527
- $ depth = substr_count ($ name ," / " );
528
+ $ depth = substr_count ($ name ,$ dirSep );
528
529
529
530
// track old types and subtypes for increment purposes
530
531
@@ -595,10 +596,10 @@ protected function gatherPatternInfo() {
595
596
596
597
if ($ patternSubtypeSet ) {
597
598
$ patternPath = $ patternType ."/ " .$ patternSubtype ."/ " .$ pattern ; // 00-atoms/01-global/00-colors
598
- $ patternPathDash = str_replace (" / " ,"- " ,$ patternPath ); // 00-atoms-01-global-00-colors (file path)
599
+ $ patternPathDash = str_replace ($ dirSep ,"- " ,$ patternPath ); // 00-atoms-01-global-00-colors (file path)
599
600
} else {
600
- $ patternPath = $ patternType ." / " .$ pattern ; // 00-atoms/00-colors
601
- $ patternPathDash = str_replace (" / " ,"- " ,$ patternPath ); // 00-atoms-00-colors (file path)
601
+ $ patternPath = $ patternType .$ dirSep .$ pattern ; // 00-atoms/00-colors
602
+ $ patternPathDash = str_replace ($ dirSep ,"- " ,$ patternPath ); // 00-atoms-00-colors (file path)
602
603
}
603
604
604
605
// track to see if this pattern should get rendered
@@ -608,9 +609,9 @@ protected function gatherPatternInfo() {
608
609
if ($ patternFull [0 ] != "_ " ) {
609
610
610
611
// set-up the names
611
- $ patternDash = $ this ->getPatternName ($ pattern ,false ); // colors
612
- $ patternClean = str_replace ("- " ," " ,$ patternDash ); // colors (dashes replaced with spaces)
613
- $ patternPartial = $ patternTypeDash ."- " .$ patternDash ; // atoms-colors
612
+ $ patternDash = $ this ->getPatternName ($ pattern ,false ); // colors
613
+ $ patternClean = str_replace ("- " ," " ,$ patternDash ); // colors (dashes replaced with spaces)
614
+ $ patternPartial = $ patternTypeDash ."- " .$ patternDash ; // atoms-colors
614
615
615
616
// set-up the info for the nav
616
617
$ patternInfo = array ("patternPath " => $ patternPathDash ."/ " .$ patternPathDash .".html " ,
@@ -670,11 +671,11 @@ protected function gatherPatternInfo() {
670
671
671
672
// add to patternPaths
672
673
if ($ patternSubtypeSet ) {
673
- $ patternPath = $ patternType ." / " .$ patternSubtype ." / " .$ pattern ; // 00-atoms/01-global/00-colors
674
- $ patternPathDash = str_replace (" / " ,"- " ,$ patternPath ); // 00-atoms-01-global-00-colors (file path)
674
+ $ patternPath = $ patternType .$ dirSep .$ patternSubtype .$ dirSep .$ pattern ; // 00-atoms/01-global/00-colors
675
+ $ patternPathDash = str_replace ($ dirSep ,"- " ,$ patternPath ); // 00-atoms-01-global-00-colors (file path)
675
676
} else {
676
- $ patternPath = $ patternType ." / " .$ pattern ; // 00-atoms/00-colors
677
- $ patternPathDash = str_replace (" / " ,"- " ,$ patternPath ); // 00-atoms-00-colors (file path)
677
+ $ patternPath = $ patternType .$ dirSep .$ pattern ; // 00-atoms/00-colors
678
+ $ patternPathDash = str_replace ($ dirSep ,"- " ,$ patternPath ); // 00-atoms-00-colors (file path)
678
679
}
679
680
680
681
// add all patterns to patternPaths
0 commit comments