Skip to content

Commit

Permalink
fix: xcode15+ios17beta cannot adapt with https or http pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
happiness9721 authored Apr 25, 2024
1 parent 00bd578 commit 7714801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/URLMatcher/URLPathComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ enum URLPathComponent {

extension URLPathComponent {
init(_ value: String) {
if value.hasPrefix("<") && value.hasSuffix(">") {
if value.hasPrefix("[") && value.hasSuffix("]") {
let start = value.index(after: value.startIndex)
let end = value.index(before: value.endIndex)
let placeholder = value[start..<end] // e.g. "<int:id>" -> "int:id"
Expand Down

0 comments on commit 7714801

Please sign in to comment.