We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71b5053 commit 82ea29bCopy full SHA for 82ea29b
src/utils/text.rs
@@ -13,7 +13,7 @@ pub fn suppress_github_mentions(text: &str) -> String {
13
14
let segment = r"[a-zA-Z0-9][a-zA-Z0-9\-]{0,38}";
15
let pattern = format!(
16
- r"(^|[^a-zA-Z0-9_])(@{0}(?:/{0})*)($|[^a-zA-Z0-9_\-])",
+ r"(^|[^a-zA-Z0-9_])(@{0}(?:/{0})*)([^a-zA-Z0-9_\-/.]|$)",
17
segment
18
);
19
@@ -70,6 +70,7 @@ mod tests {
70
suppress_github_mentions("user@example.com"),
71
"user@example.com"
72
73
+ assert_eq!(suppress_github_mentions("abč@user.com"), "abč@user.com");
74
75
// Invalid mentions
76
assert_eq!(suppress_github_mentions("@-user"), "@-user");
0 commit comments