Explorar o código

receive lastline number directly

soumaeda %!s(int64=2) %!d(string=hai) anos
pai
achega
4b810381cc

+ 1 - 1
apps/app/src/components/PageEditor/MarkdownTableUtilForEditor.ts

@@ -53,7 +53,7 @@ export const getEot = (editor: EditorView): number => {
   }
   }
 
 
   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(curPos(editor)).number + 1;
   let line = doc.lineAt(curPos(editor)).number + 1;
   for (; line <= lastLineNum; line++) {
   for (; line <= lastLineNum; line++) {
     const strLine = doc.line(line).text;
     const strLine = doc.line(line).text;