Explorar el Código

Fix hashtag regex

Zed hace 7 años
padre
commit
c158ce8517
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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]|^)([#$][A-z0-9]+)"
   ytRegex = re"(www.|m.)?youtu(be.com|.be)"
   twRegex = re"(www.|mobile.)?twitter.com"
   nbsp = $Rune(0x000A0)