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 = {
11
11
'algorithms' ,
12
12
'database' ,
13
13
'shell' ,
14
+ 'lcof' ,
15
+ 'lcci' ,
14
16
'concurrency'
15
17
] ,
16
18
langs : [
Original file line number Diff line number Diff line change @@ -165,12 +165,16 @@ file.meta = function(filename) {
165
165
// first look into the file data
166
166
const line = this . data ( filename ) . split ( '\n' )
167
167
. 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
174
178
175
179
// otherwise, look into file name
176
180
if ( ! m . id || ! m . lang ) {
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " vsc-leetcode-cli" ,
3
- "version" : " 2.8.0 " ,
2
+ "name" : " @haozibi/ vsc-leetcode-cli" ,
3
+ "version" : " 2.8.1 " ,
4
4
"description" : " A cli tool to enjoy leetcode!" ,
5
5
"engines" : {
6
6
"node" : " >=4"
You can’t perform that action at this time.
0 commit comments