Merge pull request #5040 from matrix-org/t3chguy/community-autocomplete

Fix autocompletion of Community IDs
This commit is contained in:
Michael Telatynski 2020-07-24 00:01:48 +01:00 committed by GitHub
commit 55b9ba23c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -186,7 +186,7 @@ abstract class PlainBasePart extends BasePart {
}
// when not pasting or dropping text, reject characters that should start a pill candidate
if (inputType !== "insertFromPaste" && inputType !== "insertFromDrop") {
return chr !== "@" && chr !== "#" && chr !== ":";
return chr !== "@" && chr !== "#" && chr !== ":" && chr !== "+";
}
return true;
}
@ -463,6 +463,7 @@ export class PartCreator {
case "#":
case "@":
case ":":
case "+":
return this.pillCandidate("");
case "\n":
return new NewlinePart();