diff --git a/lib/ui/widgets/text_widget.dart b/lib/ui/widgets/text_widget.dart index 43f474a..f1602fa 100644 --- a/lib/ui/widgets/text_widget.dart +++ b/lib/ui/widgets/text_widget.dart @@ -43,7 +43,8 @@ class TextWidget extends StatelessWidget { } /// Sub parse function - List _parseLinks(BuildContext context, String text, TextStyle style) { + List _parseLinks( + BuildContext context, String text, TextStyle style) { var buff = StringBuffer(); final list = new List(); @@ -79,8 +80,8 @@ class TextWidget extends StatelessWidget { buff.write(" "); } - // Check if it is a user reference - else if(validateUserReference(word)) { + // Check if it is a directory reference + else if (validateDirectoryReference(word)) { changeWordType(); list.add( diff --git a/lib/utils/input_utils.dart b/lib/utils/input_utils.dart index 9ec1fab..bf88238 100644 --- a/lib/utils/input_utils.dart +++ b/lib/utils/input_utils.dart @@ -28,6 +28,6 @@ bool validateUrl(String url) { } } -/// Validate user reference -bool validateUserReference(String ref) => +/// Validate directory reference +bool validateDirectoryReference(String ref) => RegExp(r'@[a-zA-Z0-9]+').hasMatch(ref);