Improve hashtag regex

Fixes #178
This commit is contained in:
Zed 2020-06-04 23:01:51 +02:00
parent 240a6f9fd3
commit 3ecda47c73
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ const
unRegex = re"(^|[^A-z0-9-_./?])@([A-z0-9_]{1,15})"
unReplace = "$1<a href=\"/$2\">@$2</a>"
htRegex = re"(^|[^A-z0-9-_./?])#([A-z0-9_]+)"
htRegex = re"(^|[^\w-_./?])#([\w_]+)"
htReplace = "$1<a href=\"/search?q=%23$2\">#$2</a>"
template isNull*(js: JsonNode): bool = js.kind == JNull