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

Commit a4c3b05

Browse files
committed
Merge branch 'issue_#21634' of https://github.com/Sinharitik589/matrix-react-sdk into issue_#21634
2 parents 7c20ed7 + ed013f4 commit a4c3b05

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/editor/operations.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -225,10 +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,
229-
text?[partCreator.plain("[" + range.text + "]" + "(" + text + ")")]:
230-
[partCreator.plain("[" + range.text + "]" + "()")],
231-
-1);
228+
replaceRangeAndMoveCaret(range, [partCreator.plain("[" + range.text + "]" + "(" + (text ?? "") + ")")],-1);
232229
}
233230
}
234231

0 commit comments

Comments
 (0)