Skip to content

Commit

Permalink
Youtubeリンクの正規表現の修正
Browse files Browse the repository at this point in the history
  • Loading branch information
nukora committed May 10, 2021
1 parent 412ab88 commit 16b0251
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void InitializeView()
if (activityLog.ActivityType == ActivityType.PlayedVideo)
{
// Youtubeのみ特別扱いして埋め込みプレイヤーを表示する
var youtubeUrlRegex = @"^https?://(www\.)youtube\.com/watch\?v=([^&]+).*$|^https?://youtu\.be/(.*)$";
var youtubeUrlRegex = @"^https?://(www\.)?youtube\.com/watch\?v=([^&]+).*$|^https?://youtu\.be/(.*)$";
var match = Regex.Match(activityLog.Url, youtubeUrlRegex);

if (match.Success)
Expand Down

0 comments on commit 16b0251

Please sign in to comment.