Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 7750b6a

Browse files
committed
Converting selected text to MD link when pasting a URL
1 parent a4c3b05 commit 7750b6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/editor/operations.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export function formatRangeAsLink(range: Range, text?: string) {
225225
replaceRangeAndAutoAdjustCaret(range, newParts, true, prefixLength, suffixLength);
226226
} else {
227227
// We set offset to -1 here so that the caret lands between the brackets
228-
replaceRangeAndMoveCaret(range, [partCreator.plain("[" + range.text + "]" + "(" + (text ?? "") + ")")],-1);
228+
replaceRangeAndMoveCaret(range, [partCreator.plain("[" + range.text + "]" + "(" + (text ?? "") + ")")], -1);
229229
}
230230
}
231231

0 commit comments

Comments
 (0)