A template is laid out for people, with line breaks and indentation, and PAD keeps that layout in what it writes. Usually that does not matter - HTML folds whitespace - but in plain-text mail, CSV, JSON, console output and inline layouts it does.

The ~ marker

A ~ just inside a brace takes the whitespace on that side of it, newlines included:

Only a brace that opens a tag counts: a ~ in text, in CSS or in a quoted parameter stays as it is.

PHP
HTML
fragments/whitespace_1.pad
Result
{data 'xs'}["a","b","c"]{/data}
<p>
{~xs~}
{$xs}
{~/xs~}
</p>
<p>{spaceless}
<b>one</b>
<i>two</i>
{/spaceless}</p>

abc

onetwo

spaceless

{spaceless} takes the whitespace between HTML tags out of everything it wraps, and at both ends; text inside a tag keeps its spaces. For the whole page there is {tidy}.