Closed akx closed 5 years ago
this is awesome, chances we can get this merged? i am the one, left not using helm, and built a large production setup using emrichen 👍 - and this change would reduce my template overhead ALOT!
@akx unable to review currently due to being in outer space 🚀 please merge without review at your leisure. Looked over the syntax, was ok to me. Does it error if as_documents: true is rendered anyw else than top level?
On Thu, 4 Jul 2019 at 11.39, Helmut Januschka notifications@github.com wrote:
this is awesome, chances we can get this merged? i am the one, left not using helm, and built a large production setup using emrichen 👍 - and this change would reduce my template overhead ALOT!
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/con2/emrichen/pull/32?email_source=notifications&email_token=AAA2WVJEKOSAM3GXMRZB3H3P5WZNPA5CNFSM4H5UVF52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZGX7HI#issuecomment-508395421, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA2WVJZM4FVSCBUNFR4FHTP5WZNPANCNFSM4H5UVF5Q .
-- Santtu Pajukanta
Does it error if as_documents: true is rendered anyw else than top level?
No – it just has no effect. I don't think we have an easy way to figure out what level we're enrich
ing at.
this change lead to (with a first quick refactor):
thank you folks! (less code is best code)
This PR adds
as_documents: bool
to theLoop
tag. It only has an effect at the top level of a template.Refs #31.
Example (from the test):
is emitted as
whereas without the flag, it's emitted as a single document