Skip to content

Commit

Permalink
Hopefully fix #347. Use Path tools and regex instead of hackish
Browse files Browse the repository at this point in the history
string-length tomfoolery
  • Loading branch information
geoffp committed Jun 3, 2016
1 parent d401904 commit cac925a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/object_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var Pattern = function (relPath, data) {
this.patternGroup = this.name.substring(this.name.indexOf('-') + 1, this.name.indexOf('-', 4) + 1 - this.name.indexOf('-') + 1);

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

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

0 comments on commit cac925a

Please sign in to comment.