Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Commit 0a4f6ee

Browse files
committed
Fix a total misinterpretation of underscore-prefixed patterns: they're
not supposed to be completely excluded from processing, they're just supposed to not appear in the nav, styleguide, or view all views. Per http://patternlab.io/docs/pattern-hiding.html
1 parent d7a3846 commit 0a4f6ee

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

core/lib/pattern_engines/pattern_engines.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@
152152
isPatternFile: function (filename) {
153153
// skip hidden patterns/files without a second thought
154154
var extension = path.extname(filename);
155-
if(filename.charAt(0) === '.' ||
156-
filename.charAt(0) === '_' ||
155+
if (filename.charAt(0) === '.' ||
157156
(extension === '.json' && !PatternEngines.isPseudoPatternJSON(filename))) {
158157
return false;
159158
}

test/pattern_engines_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
'00-comment-thread.mustache': true,
7272
'00-comment-thread.fakeextthatdoesntexist': false,
7373
'00-comment-thread': false,
74-
'_00-comment-thread.mustache': false,
74+
'_00-comment-thread.mustache': true,
7575
'.00-comment-thread.mustache': false,
7676
'00-comment-thread.json': false,
7777
'00-homepage~emergency.json': true

0 commit comments

Comments
 (0)