• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter inserting tabs into markup.

I've noticed that in outputting my markup, Codeigniter is also outputting all of the tabs I use for indentation in my code. This results in a large amount of extra whitespace in my markup. I use notepad++ as my coding environment, and the extra whitespaces are output the same in the source in all browsers.

I found in the core where \n and \r are dealt with, but is there a place where \t is dealt with? It doesn't affect the performance of my code, it just looks like crap.

And it's all about the looks right?

Thanks in advance.

CodeIgniter does nothing to your view except pipe it to the browser (optionally with caching) so if you do not want your indentations in your view, you gotta remove them in your view file. If I am not mistaken, the core just uses the \n , \r etc. just to ensure that the output is the same as your view file. I could be wrong. But I usually do not have to worry about people looking at my source code so our scenarios may vary.

Sounds like your editor is inserting the tabs in your source code!

Check your editor settings!


Yep. Its the editor... I justed switched to notepad++ from DW after realizing what bloated crud it is. I think i've got it figured out now. Thanks for the responses!

I've taken over projects from others who used Notepad++. At first glance, there didn't appear to be excessive spacing/tabs, until I opened them up in Eclipse IDE! It was a nightmare and frusterating!

Is there an ide that you would recommend? I'm tired of all the bloat in these programs. I just want textmate or coda on my pc...

eText Editor! Textmate for windows, its awesome! There live edit feature is the best I've ever used btw.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.