Strip extra spaces after links
This commit is contained in:
parent
2a5e0a3f54
commit
51214c1975
1 changed files with 2 additions and 0 deletions
|
@ -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