mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Fix invalid search link formatting
This commit is contained in:
parent
1c06a67afd
commit
dcec1eb458
5 changed files with 7 additions and 7 deletions
|
|
@ -17,7 +17,7 @@ let
|
|||
unReplace = "$1<a href=\"/$2\">@$2</a>"
|
||||
|
||||
htRegex = re"(^|[^\w-_./?])([#$]|#)([\w_]+)"
|
||||
htReplace = "$1<a href=\"/search?q=%23$3\">$2$3</a>"
|
||||
htReplace = "$1<a href=\"/search?f=tweets&q=%23$3\">$2$3</a>"
|
||||
|
||||
type
|
||||
ReplaceSliceKind = enum
|
||||
|
|
@ -207,7 +207,7 @@ proc replacedWith(runes: seq[Rune]; repls: openArray[ReplaceSlice];
|
|||
let
|
||||
name = $runes[rep.slice.a.succ .. rep.slice.b]
|
||||
symbol = $runes[rep.slice.a]
|
||||
result.add a(symbol & name, href = "/search?q=%23" & name)
|
||||
result.add a(symbol & name, href = "/search?f=tweets&q=%23" & name)
|
||||
of rkMention:
|
||||
result.add a($runes[rep.slice], href = rep.url, title = rep.display)
|
||||
of rkUrl:
|
||||
|
|
|
|||
Loading…
Reference in a new issue