Fix converted youtube channel links
This commit is contained in:
parent
9b4b70e2e4
commit
df943c09d9
|
@ -39,6 +39,8 @@ proc replaceUrl*(url: string; prefs: Prefs; absolute=""): string =
|
||||||
result = url
|
result = url
|
||||||
if prefs.replaceYouTube.len > 0:
|
if prefs.replaceYouTube.len > 0:
|
||||||
result = result.replace(ytRegex, prefs.replaceYouTube)
|
result = result.replace(ytRegex, prefs.replaceYouTube)
|
||||||
|
if prefs.replaceYouTube in result:
|
||||||
|
result = result.replace("/c/", "/")
|
||||||
if prefs.replaceTwitter.len > 0:
|
if prefs.replaceTwitter.len > 0:
|
||||||
result = result.replace(tco, "https://" & prefs.replaceTwitter & "/t.co")
|
result = result.replace(tco, "https://" & prefs.replaceTwitter & "/t.co")
|
||||||
result = result.replace(cards, prefs.replaceTwitter & "/cards")
|
result = result.replace(cards, prefs.replaceTwitter & "/cards")
|
||||||
|
|
Loading…
Reference in New Issue