Fix converted youtube channel links

This commit is contained in:
Zed 2020-03-09 00:47:00 +01:00
parent 9b4b70e2e4
commit df943c09d9
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ proc replaceUrl*(url: string; prefs: Prefs; absolute=""): string =
result = url
if prefs.replaceYouTube.len > 0:
result = result.replace(ytRegex, prefs.replaceYouTube)
if prefs.replaceYouTube in result:
result = result.replace("/c/", "/")
if prefs.replaceTwitter.len > 0:
result = result.replace(tco, "https://" & prefs.replaceTwitter & "/t.co")
result = result.replace(cards, prefs.replaceTwitter & "/cards")