Update regex reduce_uri utils

Follow this comment :
https://github.com/iv-org/invidious/pull/2936#discussion_r850712676
このコミットが含まれているのは:
Féry Mathieu (Mathius) 2022-04-14 22:42:21 +02:00
コミット 6c122248f5
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: F9CCC80C18A59037
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -367,7 +367,7 @@ def fetch_random_instance
end
def reduce_uri(uri : URI | String, max_length : Int32 = 50, suffix : String = "") : String
str = uri.to_s.sub(/https?:\/\//, "")
str = uri.to_s.sub(/^https?:\/\//, "")
if str.size > max_length
str = "#{str[0, max_length]}#{suffix}"
end