Fix line breaks in template expansion