@@ -61,7 +61,7 @@ function getCategories() {
61
61
for ( let j = 1 ; j < metadata . name . split ( '_' ) . length ; j += 1 ) {
62
62
category += `${ metadata . name . split ( '_' ) [ j ] } ` ;
63
63
}
64
- categories . push ( { url : metadata . url , name : category } ) ;
64
+ categories . push ( { url : metadata . url , name : category . trim ( ) } ) ;
65
65
} ) ;
66
66
67
67
return categories ;
@@ -114,7 +114,7 @@ function getSketchContent(projectsInAllCategories) {
114
114
115
115
return rp ( options ) . then ( ( res ) => {
116
116
const noNumberprojectName = project . projectName . replace ( / ( \d + ) / g, '' ) ;
117
- if ( noNumberprojectName === 'Instance Mode : Instance Container ' ) {
117
+ if ( noNumberprojectName === 'Instance Mode: Instance Container ' ) {
118
118
for ( let i = 0 ; i < 4 ; i += 1 ) {
119
119
const splitedRes = `${ res . split ( '*/' ) [ 1 ] . split ( '</html>' ) [ i ] } </html>\n` ;
120
120
project . sketchContent = splitedRes . replace (
@@ -153,7 +153,7 @@ function createProjectsInP5user(projectsInAllCategories) {
153
153
const c = objectID ( ) . toHexString ( ) ;
154
154
const r = objectID ( ) . toHexString ( ) ;
155
155
const noNumberprojectName = project . projectName . replace ( / ( \d + ) / g, '' ) ;
156
- if ( noNumberprojectName === 'Instance Mode : Instance Container ' ) {
156
+ if ( noNumberprojectName === 'Instance Mode: Instance Container ' ) {
157
157
newProject = new Project ( {
158
158
name : project . projectName ,
159
159
user : user . _id ,
@@ -167,7 +167,7 @@ function createProjectsInP5user(projectsInAllCategories) {
167
167
} ,
168
168
{
169
169
name : 'sketch.js' ,
170
- content : '// Instance Mode : Instance Container, please check its index.html file' ,
170
+ content : '// Instance Mode: Instance Container, please check its index.html file' ,
171
171
id : a ,
172
172
_id : a ,
173
173
fileType : 'file' ,
0 commit comments