Through experimentation I have determined that DustJS erases all preceding whitespace (spaces, tabs, and newlines) but only trims trailing newlines.