Skip to content

Commit 78d2f29

Browse files
author
Gergan Penkov
committed
Fix the verbose partial #559
1 parent 3f7093c commit 78d2f29

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/lib/object_factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var Pattern = function (relPath, data, patternlab) {
5959

6060
// Let's calculate the verbose name ahead of time! We don't use path.sep here
6161
// on purpose. This isn't a file name!
62-
this.verbosePartial = this.subdir + '/' + this.fileName;
62+
this.verbosePartial = this.subdir.split(path.sep).join('/') + '/' + this.fileName;
6363

6464
this.isPattern = true;
6565
this.isFlatPattern = this.patternGroup === this.patternSubGroup;

core/lib/pattern_assembler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var pattern_assembler = function () {
3434
for (var i = 0; i < patternlab.patterns.length; i++) {
3535
switch (partialName) {
3636
case patternlab.patterns[i].relPath:
37-
case patternlab.patterns[i].subdir + '/' + patternlab.patterns[i].fileName:
37+
case patternlab.patterns[i].verbosePartial:
3838
return patternlab.patterns[i];
3939
}
4040
}

core/lib/pattern_registry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ PatternRegistry.prototype = {
6262
for (let thisPattern of patterns) {
6363
switch (partialName) {
6464
case thisPattern.relPath:
65-
case thisPattern.subdir + '/' + thisPattern.fileName:
65+
case thisPattern.verbosePartial:
6666
return thisPattern;
6767
}
6868
}

0 commit comments

Comments
 (0)