Browse Source

Remove superfluous escaping in a regex

jvoisin 2 years ago
parent
commit
c4e5dad549
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/reader/rewrite/rewrite_functions.go

+ 1 - 1
internal/reader/rewrite/rewrite_functions.go

@@ -22,7 +22,7 @@ import (
 var (
 var (
 	youtubeRegex   = regexp.MustCompile(`youtube\.com/watch\?v=(.*)`)
 	youtubeRegex   = regexp.MustCompile(`youtube\.com/watch\?v=(.*)`)
 	youtubeIdRegex = regexp.MustCompile(`youtube_id"?\s*[:=]\s*"([a-zA-Z0-9_-]{11})"`)
 	youtubeIdRegex = regexp.MustCompile(`youtube_id"?\s*[:=]\s*"([a-zA-Z0-9_-]{11})"`)
-	invidioRegex   = regexp.MustCompile(`https?:\/\/(.*)\/watch\?v=(.*)`)
+	invidioRegex   = regexp.MustCompile(`https?://(.*)/watch\?v=(.*)`)
 	imgRegex       = regexp.MustCompile(`<img [^>]+>`)
 	imgRegex       = regexp.MustCompile(`<img [^>]+>`)
 	textLinkRegex  = regexp.MustCompile(`(?mi)(\bhttps?:\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])`)
 	textLinkRegex  = regexp.MustCompile(`(?mi)(\bhttps?:\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])`)
 )
 )