As line breaks are normally insignificant in HTML (unless converted to <br> tags explicitly), this isn't really normally needed. If that's a particular use case you need, you may be best adding a custom snippet function or a custom getter on your entity to format your string exactly as you need.