Open mildred opened 5 years ago
here is way to do what's in your example:
#@ load("@ytt:template", "template")
#@ def func1():
---
hello: world
---
new: document
#@ end
--- #@ template.replace(func1())
what's happening is func1 spans chunk of first document, and then starts a new one. internal consistency checks catch it as a problem, though provide fairly cryptic error.
hello from 2022, this solution still works and is the first non carvel.dev google result for ytt multi document function
A reminder that this continues to be a rough edge for some number of folks. The desire to convert this from a panic to an error message (and provide a more approachable, actionable message) is still valuable. 👍🏻
The following example is causing a crash:
The error: