https://www.boundaryml.com logo
🟑 Newlines after statements in BAML templates
# questions
c
How can you add newlines after if or for statements in baml? For example
Copy code
template_string RenderSceneFocusCharacter(p: PerceivedCharacter) #"
- **{{ p.character.name }}**
  {%- if p.character.title %}
  - **Title:** {{ p.character.title }}
  {%- endif %}
  - **Summary:** {{ p.character.summary }}
"#
Is outputting string like
Copy code
- **Anna**  - **Title:** N/A  - **Summary:** Anna is Anna
Instead of
Copy code
- **Anna**
- **Title:** N/A
- **Summary:** Anna is Anna
v
I think you don’t want the dashes in your {%-
c
Awesome, that works!