mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 19:56:45 +02:00
fix: create a PillCandidatePart on the beginning of a part string
This commit is contained in:
parent
229a95f190
commit
a1eabde3a3
@ -189,7 +189,13 @@ abstract class PlainBasePart extends BasePart {
|
||||
if (chr !== "@" && chr !== "#" && chr !== ":" && chr !== "+") {
|
||||
return true;
|
||||
}
|
||||
// only split if the previous character is a space
|
||||
|
||||
// split if we are at the beginning of the part text
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// or split if the previous character is a space
|
||||
// or if it is a + and this is a :
|
||||
return this._text[offset - 1] !== " " &&
|
||||
(this._text[offset - 1] !== "+" || chr !== ":");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user