Sfoglia il codice sorgente

135395 get lastLine number directly

soumaeda 2 anni fa
parent
commit
def8d9f67d

+ 1 - 1
apps/app/src/components/PageEditor/MarkdownTableUtil.js

@@ -60,7 +60,7 @@ class MarkdownTableUtil {
     }
     }
 
 
     const doc = editor.state.doc;
     const doc = editor.state.doc;
-    const lastLineNum = doc.line(doc.lines).number;
+    const lastLineNum = doc.lines;
     let line = doc.lineAt(this.curPos(editor)).number + 1;
     let line = doc.lineAt(this.curPos(editor)).number + 1;
     for (; line <= lastLineNum; line++) {
     for (; line <= lastLineNum; line++) {
       const strLine = doc.line(line).text;
       const strLine = doc.line(line).text;