[eluser]CroNiX[/eluser]
Does the browser care how pretty the code looks?
This isn't a CI problem, its a problem with dynamically generated code. There is no way for CI, or any scripting language that I know of, to check its own source code, figure out where the last element was placed and create a newly "properly" indented element.
So, it would have to be able to figure out the difference between the location of:
Was that 1 tab or 4 spaces?
If this is important to you, the best you can probably do in your source code is output a tab, "\t" and maybe some newlines ("\n"), as many times as you would need just before using the helper to align it where you want it to go. Only you know where that might be. But then again, your browser doesn't give a rip what your source code looks like, only if is valid xhtml, and you are outputting extra code just to have your source code pretty? I'm sure there is a reason why you would want to spend time on this. My clients don't usually want to pay for this type of extra work (that affects nothing functionally and usually something only searchbots and the like "see").