Przeglądaj źródła

Improve hashtag regex

Fixes #47
Zed 7 lat temu
rodzic
commit
6d61c203cf
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/formatters.nim

+ 1 - 1
src/formatters.nim

@@ -11,7 +11,7 @@ const
   usernameRegex = re"(^|[^A-z0-9_?\/])@([A-z0-9_]+)"
   picRegex = re"pic.twitter.com/[^ ]+"
   ellipsisRegex = re" ?…"
-  hashtagRegex = re"([^\S]|^)([#$][A-z0-9]+)"
+  hashtagRegex = re"([^\S]|^)([#$]\w+)"
   ytRegex = re"(www.|m.)?youtu(be.com|.be)"
   twRegex = re"(www.|mobile.)?twitter.com"
   nbsp = $Rune(0x000A0)