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

Commit

Permalink
Browse files Browse the repository at this point in the history
…x-react-sdk into issue_#21634
  • Loading branch information
Sinharitik589 committed Apr 8, 2022
2 parents 7c20ed7 + ed013f4 commit a4c3b05
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/editor/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,7 @@ export function formatRangeAsLink(range: Range, text?: string) {
replaceRangeAndAutoAdjustCaret(range, newParts, true, prefixLength, suffixLength);
} else {
// We set offset to -1 here so that the caret lands between the brackets
replaceRangeAndMoveCaret(range,
text?[partCreator.plain("[" + range.text + "]" + "(" + text + ")")]:
[partCreator.plain("[" + range.text + "]" + "()")],
-1);
replaceRangeAndMoveCaret(range, [partCreator.plain("[" + range.text + "]" + "(" + (text ?? "") + ")")],-1);
}
}

Expand Down

0 comments on commit a4c3b05

Please sign in to comment.