Skip to content

Commit

Permalink
Fix trigger char not getting removed when replaceTextSuffix is empty …
Browse files Browse the repository at this point in the history
…string (#686)
  • Loading branch information
vishnutsivan authored Dec 15, 2021
1 parent 55293f1 commit 252ec34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TributeRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class TributeRange {
: ' '
text += textSuffix
let startPos = info.mentionPosition
let endPos = info.mentionPosition + info.mentionText.length + textSuffix.length
let endPos = info.mentionPosition + info.mentionText.length + (textSuffix === '' ? 1 : textSuffix.length)
if (!this.tribute.autocompleteMode) {
endPos += info.mentionTriggerChar.length - 1
}
Expand Down

0 comments on commit 252ec34

Please sign in to comment.