Fix hashtag linkifying

This commit is contained in:
Zed 2019-10-08 13:16:48 +02:00
parent f801d7f79c
commit a9f4961547
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ proc reEmailToLink*(m: RegexMatch; s: string): string =
proc reHashtagToLink*(m: RegexMatch; s: string): string = proc reHashtagToLink*(m: RegexMatch; s: string): string =
result = if m.group(0).len > 0: s[m.group(0)[0]] else: "" result = if m.group(0).len > 0: s[m.group(0)[0]] else: ""
let hash = s[m.group(1)[0]] let hash = s[m.group(1)[0]]
let link = toLink("/search?text=" & encodeUrl(hash), hash) let link = toLink("/search?q=" & encodeUrl(hash), hash)
if hash.any(isAlphaAscii): if hash.any(isAlphaAscii):
result &= link result &= link
else: else: