Welcome Guest, Not a member yet? Register   Sign In
Codeigniter inserting tabs into markup.
#1

[eluser]Jeromy[/eluser]
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.
Jeromy
#2

[eluser]intractve[/eluser]
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.
#3

[eluser]InsiteFX[/eluser]
Sounds like your editor is inserting the tabs in your source code!

Check your editor settings!

InsiteFX
#4

[eluser]Jeromy[/eluser]
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!
#5

[eluser]Jaketoolson[/eluser]
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!
#6

[eluser]Jeromy[/eluser]
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...
#7

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




Theme © iAndrew 2016 - Forum software by © MyBB