Skip to content

Commit

Permalink
Changed regex operator to use captures instead of groups for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Niedertscheider committed Mar 29, 2020
1 parent 9a78ded commit 5f5504b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Stencil/Regex+Operator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

public func ~= (regex: Regex, value: String) -> RegexMatchResult? {
let match = regex.match(in: value)
return match.captures.isEmpty ? nil : match
return match.items.isEmpty ? nil : match
}

0 comments on commit 5f5504b

Please sign in to comment.