소스 검색

set default value to the end

Yuki Takei 2 년 전
부모
커밋
6bfbc33dea
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      packages/core/src/remark-plugins/interfaces/option-parser.ts
  2. 1 1
      packages/core/src/remark-plugins/util/option-parser.ts

+ 1 - 1
packages/core/src/remark-plugins/interfaces/option-parser.ts

@@ -1,4 +1,4 @@
 export type ParseRangeResult = {
   start: number,
-  end?: number,
+  end: number,
 }

+ 1 - 1
packages/core/src/remark-plugins/util/option-parser.ts

@@ -36,7 +36,7 @@ export class OptionParser {
 
     // determine start
     let start;
-    let end;
+    let end = -1;
 
     // has operator
     if (match[3] != null) {