Page MenuHomePhabricator

D6044.id20155.diff
No OneTemporary

D6044.id20155.diff

diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js
--- a/web/chat/chat-input-bar.react.js
+++ b/web/chat/chat-input-bar.react.js
@@ -51,9 +51,10 @@
import { useSelector } from '../redux/redux-utils';
import { nonThreadCalendarQuery } from '../selectors/nav-selectors';
import SWMansionIcon from '../SWMansionIcon.react';
-import { typeaheadRegex } from '../utils/typeahead-utils';
+import { webTypeaheadRegex } from '../utils/typeahead-utils';
import css from './chat-input-bar.css';
import TypeaheadTooltip from './typeahead-tooltip.react';
+
type BaseProps = {
+threadInfo: ThreadInfo,
+inputState: InputState,
@@ -534,7 +535,7 @@
() =>
inputSliceEndingAtCursor.length === props.inputState.draft.length ||
/\s/.test(props.inputState.draft[props.inputState.textCursorPosition])
- ? inputSliceEndingAtCursor.match(typeaheadRegex)
+ ? inputSliceEndingAtCursor.match(webTypeaheadRegex)
: null,
[
inputSliceEndingAtCursor,
diff --git a/web/utils/typeahead-utils.js b/web/utils/typeahead-utils.js
--- a/web/utils/typeahead-utils.js
+++ b/web/utils/typeahead-utils.js
@@ -9,7 +9,7 @@
import { typeaheadStyle } from '../chat/chat-constants';
import { type InputState } from '../input/input-state';
-const typeaheadRegex: RegExp = new RegExp(
+const webTypeaheadRegex: RegExp = new RegExp(
`(?<textPrefix>(?:^(?:.|\n)*\\s+)|^)@(?<username>${oldValidUsernameRegexString})?$`,
);
@@ -136,7 +136,7 @@
}
export {
- typeaheadRegex,
+ webTypeaheadRegex,
getCaretOffsets,
getTypeaheadTooltipActions,
getTypeaheadTooltipPosition,

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 8:50 PM (21 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2594887
Default Alt Text
D6044.id20155.diff (1 KB)

Event Timeline