From cff1fd04cd4fbfbc23916d694f6f3b5f13b35031 Mon Sep 17 00:00:00 2001 From: miakh <2659269+miakh@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:33:41 +0100 Subject: [PATCH] regex fix --- lib/services/LinkModel.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/LinkModel.dart b/lib/services/LinkModel.dart index 178bf3a5..af7854cd 100644 --- a/lib/services/LinkModel.dart +++ b/lib/services/LinkModel.dart @@ -12,7 +12,7 @@ class LinkModel { String? secondPart; // Use a regular expression with named groups to match the pattern after the hash sign (#) - final regex = RegExp(r'#\/(?[^\/]+)\/(?[^\/]+)'); + final regex = RegExp(r'#\/(?[^\/]+)(?:\/(?[^\/]+))?'); final match = regex.firstMatch(url); var rootLinks = AppRouter.getRootLinks();