Skip to content

Commit 419373e

Browse files
Merge pull request #597 from carlosliu/pathsepunderscore
use path.sep to match omitted directories
2 parents 0b17382 + 9bd2f77 commit 419373e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/lib/ui_builder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ var ui_builder = function () {
8282
}
8383

8484
//this pattern is contained with a directory prefixed with an underscore (a handy way to hide whole directories from the nav
85-
isOmitted = pattern.relPath.charAt(0) === '_' || pattern.relPath.indexOf('/_') > -1;
85+
isOmitted = pattern.relPath.charAt(0) === '_' || pattern.relPath.indexOf(path.sep + '_') > -1;
8686
if (isOmitted) {
8787
if (patternlab.config.debug) {
8888
console.log('Omitting ' + pattern.patternPartial + ' from styleguide patterns because its contained within an underscored directory.');

0 commit comments

Comments
 (0)