I think that if you include the whitespace it will render the way you want.
Thanks dev_cw....this approach works for the most part. Except that when the chunk is inserted, the first line of code is actually indented in the right place and it’s all the subsequent lines of code in the chunk that have to be adjusted with extra tabs.
Like you said, the content field is more difficult, and also the wayfinder call is impossible to align. But, at least everything else lines up when viewing the source from the browser now.
@dev_cw: This works, but it is pretty annoying because when you change the structure of your HTML you have to change the indentation of every single chunk/snippet. Is there also another way to solve the poblem?