Skip to content

Commit cac925a

Browse files
committed
Hopefully fix #347. Use Path tools and regex instead of hackish
string-length tomfoolery
1 parent d401904 commit cac925a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/lib/object_factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var Pattern = function (relPath, data) {
3737
this.patternGroup = this.name.substring(this.name.indexOf('-') + 1, this.name.indexOf('-', 4) + 1 - this.name.indexOf('-') + 1);
3838

3939
// the sub-group this pattern belongs to.
40-
this.patternSubGroup = this.subdir.substring(this.subdir.indexOf('/') + 4); // 'global'
40+
this.patternSubGroup = path.basename(this.subdir).replace(/^\d*-/, ''); // 'global'
4141

4242
// Not sure what this is used for.
4343
this.flatPatternPath = this.subdir.replace(/[\/\\]/g, '-'); // '00-atoms-00-global'

0 commit comments

Comments
 (0)