You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/shared/context-mentions.ts
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,10 +26,9 @@ Mention regex:
26
26
- **Exact Word ('problems')**: Matches the exact word 'problems'.
27
27
- **Word Boundary (`\b`)**: Ensures that 'problems' is matched as a whole word and not as part of another word (e.g., 'problematic').
28
28
- `|`: Logical OR.
29
-
- `problems\b`:
30
-
- **Exact Word ('git-changes')**: Matches the exact word 'git-changes'.
31
-
- **Word Boundary (`\b`)**: Ensures that 'git-changes' is matched as a whole word and not as part of another word.
32
-
29
+
- `terminal\b`:
30
+
- **Exact Word ('terminal')**: Matches the exact word 'terminal'.
31
+
- **Word Boundary (`\b`)**: Ensures that 'terminal' is matched as a whole word and not as part of another word (e.g., 'terminals').
33
32
- `(?=[.,;:!?]?(?=[\s\r\n]|$))`:
34
33
- **Positive Lookahead (`(?=...)`)**: Ensures that the match is followed by specific patterns without including them in the match.
35
34
- `[.,;:!?]?`:
@@ -43,14 +42,15 @@ Mention regex:
43
42
- URLs that start with a protocol (like 'http://') followed by any non-whitespace characters (including query parameters).
44
43
- The exact word 'problems'.
45
44
- The exact word 'git-changes'.
45
+
- The exact word 'terminal'.
46
46
- It ensures that any trailing punctuation marks (such as ',', '.', '!', etc.) are not included in the matched mention, allowing the punctuation to follow the mention naturally in the text.
47
47
48
48
- **Global Regex**:
49
49
- `mentionRegexGlobal`: Creates a global version of the `mentionRegex` to find all matches within a given string.
0 commit comments