Skip to content

Commit

Permalink
compat for space separator
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jun 21, 2024
1 parent 5192ca0 commit 0daf44b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/relay/src/main/RelayRound.scala
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ object RelayRound:
def findId(url: String): Option[String] = url match
case idRegex(id) => id.some
case _ => none
def find(url: String): Option[UpstreamLcc] = url.split('/').map(_.trim).filter(_.nonEmpty) match
case Array(idRegex(id), round) => round.toIntOption.map(UpstreamLcc(id, _))
case _ => none
def find(url: String): Option[UpstreamLcc] =
url.trim.replace(" ", "/").split('/') match
case Array(idRegex(id), round) => round.toIntOption.map(UpstreamLcc(id, _))
case _ => none

trait AndTour:
val tour: RelayTour
Expand Down

0 comments on commit 0daf44b

Please sign in to comment.