Fixed using spaces in filter expressions and variables lists (#178)
* fixed using spaces in filter expression * fixed breaking variables lists and filters by spaces * simplified smartJoin * avoid force unwrap
This commit is contained in:
@@ -209,11 +209,11 @@ extension Dictionary : Normalizable {
|
||||
|
||||
func parseFilterComponents(token: String) -> (String, [Variable]) {
|
||||
var components = token.smartSplit(separator: ":")
|
||||
let name = components.removeFirst()
|
||||
let name = components.removeFirst().trim(character: " ")
|
||||
let variables = components
|
||||
.joined(separator: ":")
|
||||
.smartSplit(separator: ",")
|
||||
.map { Variable($0) }
|
||||
.map { Variable($0.trim(character: " ")) }
|
||||
return (name, variables)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user