Fix expression regexp

This commit is contained in:
Alvaro Muñoz
2024-03-14 12:58:02 +01:00
parent 3150f24d3f
commit 9ca1ac5bb9

View File

@@ -24,8 +24,9 @@ string getADelimitedExpression(YamlString s, int offset) {
// not just the last (greedy match) or first (reluctant match).
result =
s.getValue()
.regexpFind("\\$\\{\\{\\s*[^\\}]+\\s*\\}\\}", _, offset)
.regexpCapture("(\\$\\{\\{\\s*[^\\}]+\\s*\\}\\})", 1)
.regexpFind("\\$\\{\\{(?:[^}]|}(?!}))*\\}\\}", _, offset)
.regexpCapture("(\\$\\{\\{(?:[^}]|}(?!}))*\\}\\})", 1)
.trim()
}
private newtype TAstNode =