[Glitch] Implement tag auto-completion by history

Port 460e380d38 to glitch-soc
This commit is contained in:
Thibaut Girka
2018-08-28 13:52:18 +02:00
committed by ThibG
parent e3246cd13b
commit 24b6811a6e
6 changed files with 135 additions and 42 deletions

View File

@@ -58,7 +58,7 @@ const handlers = {
const right = value.slice(selectionStart).search(/[\s\u200B]/);
const token = function () {
switch (true) {
case left < 0 || !/[@:]/.test(value[left]):
case left < 0 || !/[@:#]/.test(value[left]):
return null;
case right < 0:
return value.slice(left);