From f99aff2be45683effcf90689a31d393a931b1620 Mon Sep 17 00:00:00 2001 From: Alex C Date: Fri, 7 Jul 2023 14:08:37 -0400 Subject: [PATCH] Added hyphen to hashtagPattern in RegexParser so that hashtags with hyphens are recognized. --- ActiveLabel/RegexParser.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ActiveLabel/RegexParser.swift b/ActiveLabel/RegexParser.swift index fe9bd7ab..910b1a3c 100644 --- a/ActiveLabel/RegexParser.swift +++ b/ActiveLabel/RegexParser.swift @@ -10,7 +10,7 @@ import Foundation struct RegexParser { - static let hashtagPattern = "(?:^|\\s|$)#[\\p{L}0-9_]*" + static let hashtagPattern = "(?:^|\\s|$)#[\\p{L}0-9_-]*" static let mentionPattern = "(?:^|\\s|$|[.])@[\\p{L}0-9_]*" static let emailPattern = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}" static let urlPattern = "(^|[\\s.:;?\\-\\]<\\(])" +