This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve emoji autocomplete not being temporally consistent (#8086)
* Adds a test to demonstrate the issue with emoji autocomplete reported in element-hq/element-web#19302. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Trim trailing `:` when checking for autocompletes for emoji. Closes element-hq/element-web#19302 Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Move all references to the emoji delimiter character to reference a constant. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Revert "Move all references to the emoji delimiter character to reference a constant." This reverts commit ac09e71. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Rename variable. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Make the test file a .js file. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Update quotes to match style and make a valid stubbed room. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Fix variable name and test reporting. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Use str.replace with a regex. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Use an improved regex that does not have have to iterate through the entire string, and can just backtrack at most the last 2 characters. Signed-off-by: Ryan Browne <code@commonlawfeature.com> * Revert "Use an improved regex that does not have have to iterate through the entire string, and can just backtrack at most the last 2 characters." This regex is very efficient, but requires a specific form of the emoji shortcode that it is not clear is within our control. This is a restriction that is not required by the technicalities of solving the bug this PR is attempting to fix. (It requires that an emoji shortcode end with a colon.) This reverts commit 220cb0e. Signed-off-by: Ryan Browne <code@commonlawfeature.com> Co-authored-by: Ryan Browne <code@commonlawfeature.com>
- Loading branch information