Skip to content

Commit a2cb083

Browse files
Fixing regex for chat autocomplete
1 parent 62005ca commit a2cb083

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/AutoCompleteInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class AutoCompleteInput extends React.PureComponent {
184184

185185
const tokenMatch = text
186186
.slice(0, selectionEnd)
187-
.match(/(?!^|\W)?@\w*\s?\w*$/g);
187+
.match(/(?!^|\W)?[:@][^\s]*\s?[^\s]*$/g);
188188

189189
const lastToken = tokenMatch && tokenMatch[tokenMatch.length - 1].trim();
190190
const triggers = this.props.triggerSettings;

0 commit comments

Comments
 (0)