Smarty删除空白

I'm using Smarty with CodeIgniter.

Here's my code:

<!doctype html>
<html lang="en-gb">
    <head>
        <title>Frustrating as Hell</title>
        <meta charset="utf-8">
    </head>

    <body>
        {if $test == 'hello'}
            Hello!
        {/if}
    </body>
</html>

If I view-source on Chrome, I see this (removed unnecessary parts):

<body>
                    Hello!
            </body>

I want it to be nested correctly like so:

<body>
    Hello!
</body>

How would I do this? Please don't suggest {strip}{/strip}, that outputs <body>Hello!</body> which I don't want.

Thanks!

I don't really understand why you would want it to look good in chrome's view-source but if I were you, I'd play around with the source

<!doctype html>
<html lang="en-gb">
    <head>
        <title>Frustrating as Hell</title>
        <meta charset="utf-8">
    </head>

    <body>{if $test == 'hello'}
        Hello!{/if}
    </body>
</html>

I don't know if this will work, but either way, you will end up having your working code not neat or the result not neat. If I had choice, I'd chose the resulting code not neat, because in fact nobody will look at it (well I guess) ;-)