We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3126658 + 2aa8ad8 commit 64572e9Copy full SHA for 64572e9
src/pages/home/report/ReportActionCompose/SuggestionMention.js
@@ -203,7 +203,8 @@ function SuggestionMention({
203
suggestionEndIndex = indexOfFirstSpecialCharOrEmojiAfterTheCursor + selectionEnd;
204
}
205
206
- const leftString = value.substring(0, suggestionEndIndex);
+ const newLineIndex = value.lastIndexOf('\n', selectionEnd - 1);
207
+ const leftString = value.substring(newLineIndex + 1, suggestionEndIndex);
208
const words = leftString.split(CONST.REGEX.SPACE_OR_EMOJI);
209
const lastWord = _.last(words);
210
const secondToLastWord = words[words.length - 3];
0 commit comments