Open jbortkiewicz opened 3 days ago
I will probably rewrite the parsing of JMustache later this summer to match JStachio and will attempt to fix this bug next week.
In the meantime I recommend considering using JStachio zero dependency mode for OpenAPI. With the zero dep mode https://jstach.io/doc/jstachio/current/apidocs/#code_generation_mode which is designed for code generation in APT or OpenAPI projects. I tested and this bug does not happen with it.
@jskov I know was using it for that so they maybe able to help you.
Description:
When a partial contains multiple nested standalone sections,the indentation is rendered for each standalone section tag (opening and closing), causing an accumulated indentation preceding a next output.
Context:
I found this issue while trying to develop templates that produce "pretty" formatted code with openapi-generator. It is a very common use case (not only with openapi-generator), that partial contains several nested sections intended to implement complicated if-else conditions, thus this issue makes it impossible to generate a properly indented code.
To Reproduce
Affected versions: 1.16, master (00be427d531ef1529c176ec7e6eacd27824e0c30) Failing test cases: