File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
filter/before_post_render Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,7 @@ function parseArgs(args: string) {
2323 const mark : number [ ] = [ ] ;
2424 let firstLine = 1 ;
2525 for ( let i = 0 ; i < len ; i ++ ) {
26- const kv = matches [ i ] . split ( ':' ) ;
27- const key = kv [ 0 ] ;
28- const value = kv [ 1 ] ;
26+ const [ key , value ] = matches [ i ] . split ( ':' ) ;
2927
3028 switch ( key ) {
3129 case 'highlight' :
@@ -51,9 +49,7 @@ function parseArgs(args: string) {
5149 let b = + cur . slice ( hyphen + 1 ) ;
5250 if ( Number . isNaN ( a ) || Number . isNaN ( b ) ) continue ;
5351 if ( b < a ) { // switch a & b
54- const temp = a ;
55- a = b ;
56- b = temp ;
52+ [ a , b ] = [ b , a ] ;
5753 }
5854
5955 for ( ; a <= b ; a ++ ) {
Original file line number Diff line number Diff line change @@ -69,9 +69,7 @@ function parseArgs(args: string[]): HighlightOptions {
6969 let b = + cur . slice ( hyphen + 1 ) ;
7070 if ( Number . isNaN ( a ) || Number . isNaN ( b ) ) continue ;
7171 if ( b < a ) { // switch a & b
72- const temp = a ;
73- a = b ;
74- b = temp ;
72+ [ a , b ] = [ b , a ] ;
7573 }
7674
7775 for ( ; a <= b ; a ++ ) {
You can’t perform that action at this time.
0 commit comments