about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/autosuggest_textarea.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/components/autosuggest_textarea.js')
-rw-r--r--app/javascript/mastodon/components/autosuggest_textarea.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/autosuggest_textarea.js b/app/javascript/mastodon/components/autosuggest_textarea.js
index 6a16e2fc7..34904194f 100644
--- a/app/javascript/mastodon/components/autosuggest_textarea.js
+++ b/app/javascript/mastodon/components/autosuggest_textarea.js
@@ -20,7 +20,7 @@ const textAtCursorMatchesToken = (str, caretPosition) => {
     word = str.slice(left, right + caretPosition);
   }
 
-  if (!word || word.trim().length < 3 || ['@', ':'].indexOf(word[0]) === -1) {
+  if (!word || word.trim().length < 3 || ['@', ':', '#'].indexOf(word[0]) === -1) {
     return [null, null];
   }
 
@@ -170,6 +170,9 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
     if (typeof suggestion === 'object') {
       inner = <AutosuggestEmoji emoji={suggestion} />;
       key   = suggestion.id;
+    } else if (suggestion[0] === '#') {
+      inner = suggestion;
+      key   = suggestion;
     } else {
       inner = <AutosuggestAccountContainer id={suggestion} />;
       key   = suggestion;