Here is a test version of formatter.py that supports a newline() function. It returns an actual newline character. As I said above, if you call the formatter with strip_results=False then the character(s) will not be removed.
I tested it with this template and it worked
Code:
program: strcat('a', newline(), 'b')