From 6c0c66cae5efbe641ee25a22e0408837f0d36cf1 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sun, 8 Feb 2026 11:56:16 -0500 Subject: [PATCH] fix matrix.to link regex --- README.md | 3 ++- lib/helpers/extensions/link_to_mention.dart | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5c7a53f..a035b4e 100644 --- a/README.md +++ b/README.md @@ -36,10 +36,11 @@ A simple and user-friendly Matrix client made with Flutter and the Matrix Dart S - [ ] Searching - [ ] Creating (Rooms, Spaces, and DMs) - [x] Joining + - [ ] Parse vias - [x] Using a text/uri/link - [x] Plain text - [x] `matrix:` Uri - - [ ] Matrix.to link: I just need to fix my regex, I should do this soon. + - [x] Matrix.to link: I just need to fix my regex, I should do this soon. - [ ] From space - [ ] Exploring - [x] Leaving diff --git a/lib/helpers/extensions/link_to_mention.dart b/lib/helpers/extensions/link_to_mention.dart index 8095132..b0e62aa 100644 --- a/lib/helpers/extensions/link_to_mention.dart +++ b/lib/helpers/extensions/link_to_mention.dart @@ -13,7 +13,7 @@ extension LinkToMention on String { final trimmed = trim(); final matrixTo = RegExp( - r"^https?://matrix\.to/#/([^/?#]+)", + r"^https?://matrix\.to/#/(.[^/?#]+)", caseSensitive: false, );