Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
fix: iOS 17 negative lookahead regex bug (#53)
Browse files Browse the repository at this point in the history
* fix: iOS 17 negative lookahead regex bug

* bump version
  • Loading branch information
dantes-git authored Sep 5, 2023
1 parent efdc947 commit 75a862d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Beagle.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pod::Spec.new do |spec|

spec.name = "Beagle"

spec.version = '1.2.0'
spec.version = '2.0.3'

spec.summary = "A framework to help implement Server-Driven UI in your apps natively."
spec.description = <<-DESC
Expand Down
11 changes: 10 additions & 1 deletion Sources/Beagle/Sources/ContextExpression/Expression/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,16 @@ let pathIndexNode: Parser<Path.Node> = zip(
.index(int)
}

let pathKeyNode: Parser<Path.Node> = prefix(with: #"^\w+\b(?!\()"#).map { .key($0) }
//let pathKeyNode: Parser<Path.Node> = prefix(with: #"^\w+\b(?!\()"#).map { .key($0) }
let pathKeyNode = Parser<Path.Node> { str in
guard let keyNode = prefix(with: #"^\w+"#).run(&str) else { return nil }
if str.first == "(" {
str = keyNode[...] + str
return nil
} else {
return .key(keyNode)
}
}

let pathHeadNodes: Parser<[Path.Node]> = zip(
zeroOrOne(pathKeyNode),
Expand Down

0 comments on commit 75a862d

Please sign in to comment.