File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ const DEFAULT_CONFIG = {
1111 'algorithms' ,
1212 'database' ,
1313 'shell' ,
14+ 'lcof' ,
15+ 'lcci' ,
1416 'concurrency'
1517 ] ,
1618 langs : [
Original file line number Diff line number Diff line change @@ -165,12 +165,16 @@ file.meta = function(filename) {
165165 // first look into the file data
166166 const line = this . data ( filename ) . split ( '\n' )
167167 . find ( x => x . indexOf ( ' @lc app=' ) >= 0 ) || '' ;
168- line . split ( ' ' ) . forEach ( function ( x ) {
169- const v = x . split ( '=' ) ;
170- if ( v . length == 2 ) {
171- m [ v [ 0 ] ] = v [ 1 ] . trim ( ) ;
172- }
173- } ) ;
168+ // line.split(' ').forEach(function(x) {
169+ // const v = x.split('=');
170+ // if (v.length == 2) {
171+ // m[v[0]] = v[1].trim();
172+ // }
173+ // });
174+ const reg = / a p p = (?< app > .+ ?) i d = (?< id > .+ ?) l a n g = (?< lang > .+ ?) $ / ;
175+ const res = reg . exec ( line ) ;
176+ m . id = res . groups . id
177+ m . lang = res . groups . lang
174178
175179 // otherwise, look into file name
176180 if ( ! m . id || ! m . lang ) {
Original file line number Diff line number Diff line change 11{
2- "name" : " vsc-leetcode-cli" ,
3- "version" : " 2.8.0 " ,
2+ "name" : " @haozibi/ vsc-leetcode-cli" ,
3+ "version" : " 2.8.1 " ,
44 "description" : " A cli tool to enjoy leetcode!" ,
55 "engines" : {
66 "node" : " >=4"
You can’t perform that action at this time.
0 commit comments