localstack / airspeed

A Python implementation of Velocity templates, tailored to VTL in AWS (e.g., API Gateway, AppSync)
Other
2 stars 1 forks source link

Improve handling of multi-line dict expressions #11

Closed whummer closed 1 year ago

whummer commented 1 year ago

Improve handling of multi-line dict expressions. Starting point for this PR was a user issue related to incorrect parsing of multi-line dicts in AppSync VTL templates.

The problem is that the regex patterns were not using the multiline flag (re.M) to search for whitespaces (newlines) in dict expressions, which is now fixed. The PR also adds a simple AWS validated snapshot test.