mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-22 23:25:35 +00:00
Strip extra spaces after links
This commit is contained in:
parent
2a5e0a3f54
commit
51214c1975
|
@ -49,6 +49,8 @@ proc linkifyText*(text: string): string =
|
|||
result = result.replace(usernameRegex, reUsernameToLink)
|
||||
result = result.replace(emailRegex, reEmailToLink)
|
||||
result = result.replace(urlRegex, reUrlToLink)
|
||||
result = result.replace(re"</a>\s+", "</a> ")
|
||||
result = result.replace(re"</a> ([.,\)])", "</a>$1")
|
||||
|
||||
proc stripTwitterUrls*(text: string): string =
|
||||
result = text
|
||||
|
|
Loading…
Reference in a new issue