Skip to content

Commit

Permalink
Use better regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 committed Jan 10, 2024
1 parent 40281de commit 49073aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/suwayomi/tachidesk/launcher/ui/Extension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import javax.swing.JScrollPane

private val repoMatchRegex =
(
"https:\\/\\/(?:www|raw)?(?:github|githubusercontent)\\.com" +
"\\/([^\\/]+)\\/([^\\/]+)(?:\\/(?:tree|blob)\\/(.*))?\\/?"
"https:\\/\\/(?>www\\.|raw\\.)?(github|githubusercontent)\\.com" +
"\\/([^\\/]+)\\/([^\\/]+)(?>(?>\\/tree|\\/blob)?\\/([^\\/\\n]*))?(?>\\/([^\\/\\n]*\\.json)?)?"
).toRegex()

fun Extension(vm: LauncherViewModel, scope: CoroutineScope) = jpanel(
Expand Down

0 comments on commit 49073aa

Please sign in to comment.