diff --git a/app/soapbox/components/autosuggest_textarea.js b/app/soapbox/components/autosuggest_textarea.js index ac3a35e2d..74f6dae66 100644 --- a/app/soapbox/components/autosuggest_textarea.js +++ b/app/soapbox/components/autosuggest_textarea.js @@ -14,7 +14,7 @@ import AutosuggestEmoji from './autosuggest_emoji'; const textAtCursorMatchesToken = (str, caretPosition) => { let word; - const left = str.slice(0, caretPosition).search(/\S+$/); + const left = str.slice(0, caretPosition).search(/\S+$/); const right = str.slice(caretPosition).search(/\s/); if (right < 0) { @@ -69,7 +69,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { }; onChange = (e) => { - const [ tokenStart, token ] = textAtCursorMatchesToken(e.target.value, e.target.selectionStart); + const [tokenStart, token] = textAtCursorMatchesToken(e.target.value, e.target.selectionStart); if (token !== null && this.state.lastToken !== token) { this.setState({ lastToken: token, selectedSuggestion: 0, tokenStart }); @@ -123,7 +123,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { break; case 'Enter': case 'Tab': - // Select suggestion + // Select suggestion if (this.state.lastToken !== null && suggestions.size > 0 && !suggestionsHidden) { e.preventDefault(); e.stopPropagation(); @@ -200,13 +200,13 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { if (typeof suggestion === 'object') { inner = ; - key = suggestion.id; + key = suggestion.id; } else if (suggestion[0] === '#') { inner = suggestion; - key = suggestion; + key = suggestion; } else { inner = ; - key = suggestion; + key = suggestion; } return (