Simplify regex

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
This commit is contained in:
ChunkyProgrammer 2021-10-07 06:47:37 -04:00 committed by GitHub
parent 5ac1eab36c
commit 76f0d7512a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -375,7 +375,7 @@ const actions = {
let urlType = 'unknown'
const channelPattern =
/^\/(?:c\/|channel\/|user\/)?([^/]+)(?:\/join|\/featured|\/videos|\/playlists|\/about|\/community|\/channels)?\/?$/
/^\/(?:(c|channel|user)\/)?([^/]+)(?:\/(join|featured|videos|playlists|about|community|channels))?\/?$/
const typePatterns = new Map([
['playlist', /^\/playlist\/?$/],