mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-23 09:05:30 +00:00
Fix link linkifying
This commit is contained in:
parent
d5214e2f77
commit
e07a8d04b4
|
@ -50,7 +50,7 @@ proc linkifyText*(text: string): string =
|
||||||
result = result.replace(usernameRegex, reUsernameToLink)
|
result = result.replace(usernameRegex, reUsernameToLink)
|
||||||
result = result.replace(emailRegex, reEmailToLink)
|
result = result.replace(emailRegex, reEmailToLink)
|
||||||
result = result.replace(urlRegex, reUrlToLink)
|
result = result.replace(urlRegex, reUrlToLink)
|
||||||
result = result.replace(re"([A-z0-9])<a>", "$1 <a>")
|
result = result.replace(re"([A-z0-9\):.])<a", "$1 <a")
|
||||||
result = result.replace(re"</a> ([.,\)])", "</a>$1")
|
result = result.replace(re"</a> ([.,\)])", "</a>$1")
|
||||||
|
|
||||||
proc stripTwitterUrls*(text: string): string =
|
proc stripTwitterUrls*(text: string): string =
|
||||||
|
|
Loading…
Reference in a new issue