Browse Source

remove unnecessary code

Shun Miyazawa 2 years ago
parent
commit
7ac97d7312
1 changed files with 0 additions and 18 deletions
  1. 0 18
      packages/editor/src/services/link-util/markdown-link-util.ts

+ 0 - 18
packages/editor/src/services/link-util/markdown-link-util.ts

@@ -38,22 +38,4 @@ export const getMarkdownLink = (editor: EditorView): Linker => {
 
 export const replaceFocusedMarkdownLinkWithEditor = (editor: EditorView, linkText: string): void => {
   editor.dispatch(editor.state.replaceSelection(linkText));
-  // if (!isInLink(editor)) {
-  //   console.log('!isInLink');
-  //   editor.dispatch(editor.state.replaceSelection(linkText));
-  // }
-  // else {
-  //   // editor.dispatch(editor.state.replaceSelection(linkText));
-  //   // console.log('isInLink');
-  //   // const cursorLine = getCursorLine(editor);
-  //   // const startPos = curPos(editor) - cursorLine.from;
-  //   // const { beginningOfLink, endOfLink } = Linker.getBeginningAndEndIndexOfLink(cursorLine.text, startPos);
-  //   // editor.dispatch({
-  //   //   changes: {
-  //   //     from:  { line: cursorLine.number, ch: beginningOfLink },
-  //   //     to: endOfLink,
-  //   //     insert: linkText,
-  //   //   },
-  //   // });
-  // }
 };